1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 09:59:04 +00:00

The directory path was being passed to Script.new rather than the file in the

directory. This bug was reported by Robin Wood [1].

[1] http://seclists.org/nmap-dev/2013/q2/282
This commit is contained in:
batrick
2013-05-12 21:24:16 +00:00
parent d9de4cc552
commit 48b604bcd2

View File

@@ -786,9 +786,9 @@ local function get_chosen_scripts (rules)
elseif t == "directory" then
for f in lfs.dir(path) do
local file = path .."/".. f
if find(f, "%.nse$") and not files_loaded[file] then
if find(file, "%.nse$") and not files_loaded[file] then
script_params.selection = "directory";
local script = Script.new(path, script_params);
local script = Script.new(file, script_params);
chosen_scripts[#chosen_scripts+1] = script;
files_loaded[file] = true;
end