mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Fixed an issue in script dependencies that caused the later scripts to begin without waiting for the earlier scripts to finish. Patch written by Patrick Donneley.
This commit is contained in:
parent
00652cb231
commit
3ded2339e8
1 changed files with 7 additions and 8 deletions
15
nse_main.lua
15
nse_main.lua
|
|
@ -962,12 +962,11 @@ local function main (hosts, scantype)
|
|||
end);
|
||||
end
|
||||
|
||||
-- This iterator is passed to the run function. It returns one new script
|
||||
-- thread on demand until exhausted.
|
||||
local function threads_iter ()
|
||||
-- activate prerule scripts
|
||||
for runlevel, scripts in ipairs(runlevels) do
|
||||
print_verbose(1, "Starting runlevel %u (of %u) scan.", runlevel, #runlevels);
|
||||
for runlevel, scripts in ipairs(runlevels) do
|
||||
-- This iterator is passed to the run function. It returns one new script
|
||||
-- thread on demand until exhausted.
|
||||
local function threads_iter ()
|
||||
-- activate prerule scripts
|
||||
if (scantype == NSE_PRE_SCAN) then
|
||||
print_verbose(1, "Script Pre-scanning.");
|
||||
for script in runlevel_scripts(scripts) do
|
||||
|
|
@ -1017,10 +1016,10 @@ local function main (hosts, scantype)
|
|||
end
|
||||
end
|
||||
end
|
||||
print_verbose(1, "Starting runlevel %u (of %u) scan.", runlevel, #runlevels);
|
||||
run(wrap(threads_iter), scantype)
|
||||
end
|
||||
|
||||
run(wrap(threads_iter), scantype)
|
||||
|
||||
collectgarbage "collect";
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue