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: Sat, 11 Jun 2011 22:12:07 -0400

On Sat, Jun 11, 2011 at 9:58 PM, Patrick Donnelly <batrick () batbytes com> wrote:
As I see it we can do one of three things:

(a) Go back to the old system.
(b) Always print an error message.
(c) Accept that require may be silenced for some border cases where we
don't want it silenced. Script authors should be testing with -d...

I'm partial to (c). I don't really like (a). I think (b) defeats the
entire point.

I'm open to suggestions...

I just thought of another possibility. Since we added the
stdnse.require function which is just the original function. Maybe
instead we can keep require the same and add a stdnse.silent_require
(so reverse them). Then people would use:

stdnse.silent_require "openssl"

I think that might be the best approach. What do you all think?

- 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 ]