Nmap Development mailing list archives

Module script arguments automatically included in script documentation


From: David Fifield <david () bamsoftware com>
Date: Thu, 5 Feb 2009 17:15:28 -0700

Hello,

It used to be that if your NSE script used a module that defined its own
script arguments, you had to duplicate the @args tags in your script to
get those arguments to show up in the online documentation. So for
example all the smb-*.nse scripts had a little blurb saying that they
supported all the smb* arguments.

I just committed a change to NSEDoc that automatically includes such
arguments in script documentation. See an example at
http://nmap.org/nsedoc/scripts/smb-enum-domains.html. The description of
each argument is not repeated; it just refers you to the module
documentation.

If a certain script argument has a special meaning for your script, you
can still define it and it will not be automatically included from the
module. You can see this in the snmp-brute.nse documentation, where
snmpcommunity is defined even though it is inherited from the snmp
module. The reason for that is that giving the snmpcommunity argument
keeps snmp-brute.nse from running (the community string is what it's
trying to brute-force), and that fact deserves its own documentation.

There's no way to explicitly exclude a module's arguments if you know
they don't affect your script. smb-os-discovery.nse says, "Although the
standard smb* script arguments can be used, they likely won't change the
outcome in any meaningful way." So such a capability might become
useful.

David Fifield

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


Current thread: