Nmap Development mailing list archives

Re: [NSE] Catching socket errors, documentation discrepancy


From: David Fifield <david () bamsoftware com>
Date: Wed, 21 Sep 2011 15:26:48 -0700

On Wed, Sep 21, 2011 at 05:23:25PM -0500, Daniel Miller wrote:
Hey list,

While working on a script, I found that the socket I/O described on
the NSE API page (http://nmap.org/book/nse-api.html) and in the nmap
library documentation (http://nmap.org/nsedoc/lib/nmap.html#send) is
not how it is currently implemented. Specifically, socket operations
are now throwing Lua errors instead of returning a false value and
an error string. Is there a current reference for how errors should
be treated? Is there a plan to change the existing documentation to
match the current implementation? I could source-dive and find how
to do it myself, but I think we should be a little more
user-friendly for script authors who take the documentation at its
word.

Please be more specific about the socket errors that are causing Lua
errors for you. Can you show us example code?

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


Current thread: