Home page logo

nmap-dev logo 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
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]