Some scripts would fail due to an error (whois.nse) causing other
scripts to become deadlocked on a mutex that would never unlock. This
patch fixes this problem. See [1] for more information.
[1] http://seclists.org/nmap-dev/2009/q2/0533.html
Previously, the --script-args switch would only accept values
with alphanumeric characters or underscores. A full treatise
of the history of changes to this switch and problems can be
found here [2].
Here are the new rules for --script-args definitively:
--script-args <string>
<string> may contain a sequence of key=value pairs and array entries
separated by commas. All whitespace except where noted below is
ignored.
A key, value, or array value may be a sequence of characters except
'{', '}', ',', '=', and all space characters. You may overcome this
restriction by using quotes (single or double) to allow all characters
within the quotation marks. You may also use the quote delimiter
inside the sequence so long as it is escaped by a backslash.
A value for a key/value pair or an array value are allowed to be
a nested table delimited by '{' and '}'.
[1] http://seclists.org/nmap-dev/2009/q2/0204.html
[2] http://seclists.org/nmap-dev/2009/q2/0211.html
expression did not match files when it did. This happens when an expression
matches a set of scripts that were loaded by other expressions first. A simple
example is the same expression with different capitalization (considered
to be two different expressions):
batrick@waterdeep:~/nmap/svn/nmap$ ./nmap -d2 -v --script default,DEFAULT localhost > /dev/null
NSE: failed to initialize the script engine:
./nse_main.lua:365: 'DEFAULT' did not match a category, filename, or directory
stack traceback:
[C]: in function 'error'
./nse_main.lua:365: in function 'get_chosen_scripts'
./nse_main.lua:498: in main chunk
[C]: ?
QUITTING!
("and", "or", or "not") combined with categories, filenames, and filenames with
a '*', wildcard, to match many files. This change requires the script database
to be recompiled. Please see the thread at
http://seclists.org/nmap-dev/2009/q2/0100.html for more information.
out of date. Here is an example:
NSE: failed to initialize the script engine:
./nse_main.lua:289: database appears to be corrupt or out of date;
please update using: nmap --script-updatedb