Nmap Development mailing list archives
Re: [NSE] Dependencies not working
From: Ron <ron () skullsecurity net>
Date: Mon, 13 Dec 2010 10:02:35 -0600
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 13 Dec 2010 08:25:35 -0500 Patrick Donnelly <batrick () batbytes com> wrote:
I believe this patch fixes the problem: batrick@batbytes:~/nmap/svn/nmap$ svn diff Index: nse_main.lua =================================================================== --- nse_main.lua (revision 21299) +++ nse_main.lua (working copy) @@ -962,12 +962,11 @@ 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 @@ 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
Tested the patch, and it looks like it works. Ron -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk0GQ54ACgkQ2t2zxlt4g/Q2UQCfZ0rk3mVa8yhL6wbsUy7dOJun 4usAoLPDIl6Y9M6B7gOle7I+cC8+i+zC =0t7m -----END PGP SIGNATURE----- _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE] Dependencies not working Ron (Dec 12)
- Re: [NSE] Dependencies not working David Fifield (Dec 12)
- Re: [NSE] Dependencies not working Ron (Dec 12)
- Re: [NSE] Dependencies not working Patrick Donnelly (Dec 13)
- Re: [NSE] Dependencies not working Ron (Dec 13)
- Re: [NSE] Dependencies not working David Fifield (Dec 13)
- Re: [NSE] Dependencies not working Ron (Dec 13)
- Re: [NSE] Dependencies not working Ron (Dec 13)
- Re: [NSE] Dependencies not working David Fifield (Dec 12)