Nmap Development mailing list archives

Re: Proposal for adding new option to nmap


From: David Fifield <david () bamsoftware com>
Date: Sun, 4 Jul 2010 12:07:56 -0600

On Thu, Jul 01, 2010 at 09:30:02AM -0600, David Fifield wrote:
On Thu, Jul 01, 2010 at 11:14:06AM -0400, Patrick Donnelly wrote:
On Thu, Jul 1, 2010 at 3:04 AM, kirubakaran S <kirubakaran1989 () gmail com> wrote:
Proposed solution:
    To include a command line option in nmap,  "--script-list" that
prints the list of scripts that meets the specification criteria.

nse_main.lua already prints out the list of scripts chosen if
debugging is at two or higher:

batrick@batbytes:~/nmap/svn/nmap$ ./nmap --datadir . --script *http* -d2

NSE: Loaded 14 scripts for scanning.
NSE: Loaded 'http-auth.nse'.

No targets needed to be specified. Is this sufficient?

We're looking for something easily parseable and more formal (guaranteed
not to change). Parsing from -d2 would work though. What would be
different about --script-list is that it wouldn't allow any scanning,
and wouldn't produce output other than the script list. Command-line
users could use it to see what scripts are installed or preview what
scripts are going to be run.

As Kirubakaran said, the point of this is to get Nmap to do the script
matching for Zenmap, so the algorithm only has to be in one place.
Thanks for bringing up -d2; we may end up using that.

Kirubakaran, I see that you have already implemented the --script-list
option in your branch. Please continue your Zenmap development assuming
the option is in place. We can remove it later if necessary.

I want you to make sure this is properly modularized in the Zenmap
source code. I suggest that you create a function, something like
get_scripts_for_specification, that takes a specification as entered in
the script selection interface, runs Nmap in a subprocess, and returns a
list of script names. You can see an example of running Nmap in
zenmapCore/NmapCommand.py.

You should also change zenmapCore/scriptmetadata.py to get the list of
scripts from get_scripts_for_specification instead of parsing script.db.

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

Current thread: