Nmap Development mailing list archives

Re: [NSE] Better Handling for Require Errors


From: Patrick Donnelly <batrick () batbytes com>
Date: Wed, 4 May 2011 17:07:57 -0400

On Mon, Mar 28, 2011 at 1:02 PM, Patrick Donnelly <batrick () batbytes com> wrote:
So I wrote up a quick patch to make require errors easier for scripts.
Basically, you can now require libraries that may not exist without
having to use pcall. See also [1].

This is committed as of revision 23085. The "root" module has been
removed in favor of keeping the check for root access in the rule
function. The require function has been modified so that NSE can
silently catch require errors. If you want/need to use the real
require function, it is available as stdnse.require.

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


Current thread: