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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user