Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: [NSE] Strange bug in broadcast-ms-sql-discover
From: Patrick Donnelly <batrick () batbytes com>
Date: Mon, 24 Oct 2011 17:24:46 -0400

On Mon, Oct 24, 2011 at 12:44 PM, Patrik Karlsson <patrik () cqure net> wrote:
I'm not all that happy with scripts silently failing unless running in debug
mode.
Does anyone else feel that this isn't all that great either?

It's an interesting problem. On one hand, it's a nice way for scripts
to signal that they are "done" for whatever reason. Maybe the host
isn't running the right service after all or a different version of
the service is running. While most scripts simply return nil from the
action in these cases, I think it's reasonable to want to throw an
error too. For this reason, seeing "normal" (not unexpected) errors in
the regular output would be really annoying.

On the other hand, seeing error output can be useful as it often tells
the user how they messed up.

[Of course, we can expand NSE to allow for certain "flavors" of errors
which don't cause error output. For example, going along with our
psuedo-pthread approach, we could add a stdnse.exit function which
terminates the script silently with X reason if debugging is enabled.
The advantage here is that you can terminate the script anywhere (even
in a library) so that you don't need awkward return code checking
everywhere.]

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


  By Date           By Thread  

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