Nmap Development mailing list archives

Re: [NSE] rpcinfo - handling of an initial receive_bytes() causes not very graceful exit


From: David Fifield <david () bamsoftware com>
Date: Fri, 7 Aug 2009 17:02:15 -0600

On Thu, Aug 06, 2009 at 11:56:24AM +0100, jah wrote:
If rpcinfo.nse sends its rpc dump packet to a portmapper which then FIN
ACKs the connection then the initial receive_bytes(), which is wrapped
in a try(), will result in an error being thrown:

NSE: rpcinfo against X.X.194.130:111 threw an error!
EOF
stack traceback:
    [C]: in function 'try'
    C:\Program Files\Nmap\scripts\rpcinfo.nse:55: in function
<C:\Program Files\Nmap\scripts\rpcinfo.nse:41>
    (tail call): ?

Similarly, for any other error, e.g. TIMEOUT.  This is OK, but do we
really need the traceback?  I suggest a more graceful exit of the script:

NSE: rpcinfo failed to receive a response from X.X.194.130:111 with
error: EOF

and have attached a patch.

Looks fine. Please commit it.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: