1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Commit Graph

116 Commits

Author SHA1 Message Date
batrick
d569d5b75e Removed a debug statement that was left in. 2009-06-03 05:40:30 +00:00
batrick
e31c5973b1 Corrected a comment. 2009-06-03 05:38:44 +00:00
batrick
93c4f35f2e [NSE] When a script ends for any reason, all mutexes are now unlocked.
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
2009-06-03 03:40:13 +00:00
batrick
e2b7bbc356 Fixed some inconsistent formatting. 2009-06-02 05:28:58 +00:00
batrick
6f51d7d6a9 Fix to the parsing of the --script-args switch [1].
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
2009-05-29 00:30:56 +00:00
batrick
3b36da46b2 Corrected a log message to use format strings rather than use concatentation. 2009-05-17 19:51:01 +00:00
batrick
4a5bdd4a13 A warning is printed when a script in the script database cannot be located
using nmap_fetchfile. Nmap no longer exits due to this error.
2009-05-17 19:48:46 +00:00
batrick
5855504a35 [NSE] Fixed a bug I just found where NSE would report that a --script
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!
2009-05-13 06:39:50 +00:00
batrick
4c7e2ee53e Removed some locals that are no longer being used in nse_main.lua. 2009-05-13 05:48:57 +00:00
david
316c21e2e4 Don't call math.ceil on script runlevels; allow them to be
floating-point.
2009-05-12 21:50:35 +00:00
batrick
4209947f9b Removed escape_magic function in favor of a simple substitution. 2009-05-02 04:43:27 +00:00
batrick
98e51ec007 [NSE] Added Boolean Operators for --script. You may now use a boolean operator
("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.
2009-04-30 05:49:47 +00:00
batrick
3a06a43a24 Added a more useful error message when the script database is corrupt or
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
2009-04-29 10:16:27 +00:00
batrick
e770f37aaa Applied Jah's patch [1]. This now makes ports show for port scripts
in Starting & Finished debug messages.

[1] http://seclists.org/nmap-dev/2009/q2/0091.html
2009-04-27 11:28:29 +00:00
batrick
2b417929f1 Prevent scripts (threads) from yielding improperly (through a socket
or otherwise) in the file or in a hostrule/portrule.
2009-04-24 12:21:06 +00:00
batrick
37bbb40520 Merge of nse-lua (nse-lua-merge) minus most enchancements that were
not directly related to the change from C++ to Lua for the NSE main
procedures.

The changes are discussed in the nse-lua thread here:
http://seclists.org/nmap-dev/2009/q1/0047.html
2009-04-05 06:01:27 +00:00