1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 00:19:01 +00:00

[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!
This commit is contained in:
batrick
2009-05-13 06:39:50 +00:00
parent 4c7e2ee53e
commit 5855504a35

View File

@@ -344,9 +344,9 @@ local function get_chosen_scripts (rules)
assert(t == "file", filename.." is not a file!");
if not files_loaded[path] then
chosen_scripts[#chosen_scripts+1] = Script.new(path);
used_rules[rule_table.original_rule] = true;
files_loaded[path] = true;
end
used_rules[rule_table.original_rule] = true;
end
end
end