Nmap Development mailing list archives
Re: NSE Enhanced Output Patch
From: Patrick Donnelly <batrick () batbytes com>
Date: Tue, 27 May 2014 12:34:24 -0400
Hi Devin, On Wed, May 21, 2014 at 11:24 AM, devin bjelland <devinbjelland () gmail com> wrote:
I finished writing a patch based on community suggestions that Patrick had started a while back. print_debug and print_verbose have been superseded by debug and verbose respectively. Scripts should no longer pass SCRIPT_NAME to these functions as stdnse now determines the running script. Depending on the debug/verbosity level, the target ip and/or thread ID is also printed. To do this, several new functions have been added retrieve information about the running script.
Here are a few more changes I would like to see for this patch: o Add aliases for debug levels as extra function names: function debug1 (...) return stdnse.debug(1, ...) end function debug2 (...) return stdnse.debug(2, ...) end ... function debug5 (...) return stdnse.debug(5, ...) end and the same for verbose. The goal is here is to make these debug/verbose statements take up less space on a line. I'm tempted to even suggest using d1, d2, d3, d4, d5. Anyone have thoughts on that? o The single-quotes surrounding script ids (e.g. 'html-title') in other parts of NSE should go away for consistency. For example: NSE: Finished 'http-title' M:0x2b6b6a0 against localhost (127.0.0.1:80). o I realize updating the entire code base to the new debug/verbose functions is quite an undertaking (a good reason by itself for backwards compatibility) but we should at least update a flagship library to increase visibility of the new right way to add debug statements. I think the http library is a good choice. You may also want to write some simple regexp to correct the simpler (i.e. easy to fix) calls to debug/verbose in scripts/libraries. -- Patrick Donnelly _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- NSE Enhanced Output Patch devin bjelland (May 21)
- Re: NSE Enhanced Output Patch Patrick Donnelly (May 27)