1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-30 18:19:05 +00:00

Update --script-args to note that many scripts qualify their arguments with the script name, and that you can pass unqualified arguments to affect every script using that name. Also updated scripting.xml to emphasize that instead of using nmap.registry.args directly, scripts should get their arguments with stdnse.get_script_args. Regenerated the nroff too after making these changes to the source XML

This commit is contained in:
fyodor
2012-03-01 08:56:45 +00:00
parent 684f42c4ad
commit 1623bcfa66
5 changed files with 39 additions and 23 deletions

View File

@@ -2398,14 +2398,8 @@ escapes a quote. A backslash is only used to escape quotation marks in this
special case; in all other cases a backslash is interpreted literally. Values
may also be tables enclosed in <literal>{}</literal>, just as in Lua. A table
may contain simple string values or more name-value pairs, including nested
tables. A complex example of script arguments is
<informalexample>
<indexterm><primary><option>--script-args</option></primary><secondary>example of</secondary></indexterm>
<literallayout>
<command>--script-args 'user=foo,pass=",{}=bar",whois={whodb=nofollow+ripe},userdb=custom'</command>
</literallayout>
</informalexample>
The online NSE Documentation Portal at <ulink url="http://nmap.org/nsedoc/"/>
tables. Many scripts qualify their arguments with the script name, as in <literal>xmpp-info.server_name</literal>. You may use that full qualified version to affect just the specified script, or you may pass the unqualified version (<literal>server_name</literal> in this case) to affect all scripts using that argument name. A script will first check for its fully qualified argument name (the name specified in its documentation) before it accepts an unqualified argument name. A complex example of script arguments is
<option>--script-args 'user=foo,pass=",{}=bar",whois={whodb=nofollow+ripe},xmpp-info.server_name=localhost'</option>. The online NSE Documentation Portal at <ulink url="http://nmap.org/nsedoc/"/>
lists the arguments that each script accepts.
</para>
</listitem>