Nmap Development mailing list archives
Re: NSE output verbosity (p2p-conficker)
From: David Fifield <david () bamsoftware com>
Date: Fri, 10 Jul 2009 13:17:39 -0600
On Wed, Jun 03, 2009 at 04:59:41PM -0700, Fyodor wrote:
Another idea is to make it easy for scripts to tell if they were specified by name on the command line. Then they could increase their personal verbosity level a couple points. That way the detailed p2p-conficker results could only be printed if -vv or if the user specified something like "--script p2p-conficker" on the command line, but not for a default script scan. The theory behind this is that someone who specifies p2p-conficker on the command line is showing a particular interest in that script and likely wants to see proof that it has run, etc. But someone who just gets p2p-conficker by default is less likely to want an "all clean" report from every default script.
With Patrick Donnelly's help, I made a patch that implements this. It notices when a script is selected by name rather than by category or directory. nmap.verbosity checks whether a script is selected by name, and increases its return value by 1 when it is. Matching with a wildcard counts as matching by name, so for example in --script "default,smb-*", the default scripts will have the normal verbosity and the smb-* scripts will have elevated verbosity. There's perhaps surprising behavior when combined with Boolean operators. In --script "ssh-hostkey or default", ssh-hostkey will get higher verbosity, but with --script "default or ssh-hostkey", it won't. That's because the "or" operator short-circuits. Are there any comments on the patch? I'll probably commit it today or tomorrow. David Fifield
Attachment:
nse-verbose.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Re: NSE output verbosity (p2p-conficker) David Fifield (Jul 10)