Nmap Development mailing list archives
Re: Add script arguments to --script-help
From: Paulino Calderon <paulino () calderonpale com>
Date: Wed, 01 May 2013 17:13:43 -0500
On 05/01/2013 01:33 PM, David Fifield wrote:
Thanks. I'll look into it. I just realized it will be nice if it also includes the library argument names.On Tue, Apr 30, 2013 at 09:01:41PM -0500, Paulino Calderon wrote:I've always thought the --script-help command should give you the script arguments so I don't have to look them up when I don't remember/know the argument variables. For example the current output gives: ./nmap --script-help http-brute Starting Nmap 6.26SVN ( http://nmap.org ) at 2013-04-30 20:51 CDT http-brute Categories: intrusive brute http://nmap.org/nsedoc/scripts/http-brute.html Performs brute force password auditing against http basic authentication. This patch includes the script arguments as follows: http-brute Categories: intrusive brute http://nmap.org/nsedoc/scripts/http-brute.html Performs brute force password auditing against http basic authentication. Script Arguments: http-brute.path points to the path protected by authentication (default: /) http-brute.hostname sets the host header in case of virtual hosting http-brute.method sets the HTTP method to use (default: GET) Feel free to suggest improvements to the code, it's a starting point. I couldn't find the @args tags loaded anywhere else so I grabbed them from the file ( Maybe not the most efficient way? )You might want to take a look at the zenmapCore/ScriptMetadata class that does this job for Zenmap. Zenmap and the NSEDoc pages recursively load arguments from included libraries; you might want to do that. There is a function there called nsedoc_tags_iter in Zenmap that does the right thing for NSEDoc parsing. David Fifield
Cheers. _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Add script arguments to --script-help Paulino Calderon (Apr 30)
- Re: Add script arguments to --script-help David Fifield (May 01)
- Re: Add script arguments to --script-help Paulino Calderon (May 01)
- Re: Add script arguments to --script-help Paulino Calderon (Jun 02)
- Re: Add script arguments to --script-help David Fifield (Jun 21)
- Re: Add script arguments to --script-help David Fifield (May 01)