Nmap Development mailing list archives

Re: [nmap-svn] r29203 - nmap-exp/aca/nmap/scripts


From: Aleksandar Nikolic <nikolic.alek () gmail com>
Date: Sun, 15 Jul 2012 00:08:52 +0200

Thanks Patrick!

I've tried the script without the code that waits for all the threads to finish
and with this patch applied, and now it doesn't trigger the assert failure.
So this fixes it, I confirm it.

Any suggestions on whether I should keep the part where it waits for worker
threads to exit ?

I don't really need to wait for them as they return as soon as they
come out of sleep()
and the script finishes faster if I don't wait for that to happen, but
if it's prettier this way...


Aleksandar

On Sat, Jul 14, 2012 at 11:01 PM, Patrick Donnelly <batrick () batbytes com> wrote:
On Sat, Jul 14, 2012 at 8:46 AM, Aleksandar Nikolic
<nikolic.alek () gmail com> wrote:
Here's the output at the end of the script run

NSE Timing: About 1.96% done; ETC: 17:33 (2:55:32 remaining)
NSE: MAIN THREAD:  (attack against <target>): HTTP stream started.
NSE: MONITOR: <target> still up, answer received.
NSE: MONITOR: <target> still up, answer received.
NSE: MONITOR: <target> still up, answer received.
NSE Timing: About 1.96% done; ETC: 17:58 (3:20:36 remaining)
NSE: MONITOR: <target> still up, answer received.
NSE: MONITOR: <target> still up, answer received.
NSE: MONITOR: <target> still up, answer received.
NSE Timing: About 1.96% done; ETC: 18:24 (3:45:41 remaining)
NSE: MONITOR: <target> still up, answer received.
NSE: MONITOR: <target> still up, answer received.
NSE Timing: About 1.96% done; ETC: 18:50 (4:10:45 remaining)
NSE: MONITOR: <target> still up, answer received.
NSE: Finished http-slowloris against <target>:80.
NSE: Finished http-slowloris against <target>:80.
NSE: Script Engine Scan Aborted.
An error was thrown by the engine:
d:\workspace\nmap-exp\aca\nmap\mswin32\Debug/nse_main.lua:332: attempt
to index field '?' (a nil value)
stack traceback:
        d:\workspace\nmap-exp\aca\nmap\mswin32\Debug/nse_main.lua:332:
in function 'close'
        d:\workspace\nmap-exp\aca\nmap\mswin32\Debug/nse_main.lua:932:
in function 'run'
        d:\workspace\nmap-exp\aca\nmap\mswin32\Debug/nse_main.lua:1242:
in function <d:\workspace\nmap-exp\aca\nmap\mswin32\Debug/nse_main.lua:1149>
        [C]: in ?

This error has been found by Piotr before. We were testing some
solutions. Since the bug has bitten you as well, can you confirm
whether this patch fixes the problem for you.

$ svn diff
Index: nse_main.lua
===================================================================
--- nse_main.lua        (revision 29185)
+++ nse_main.lua        (working copy)
@@ -821,6 +821,8 @@
     };
     setmetatable(thread, thread_mt);
     total, all[co], pending[co] = total+1, thread, thread;
+    num_threads = num_threads + 1;
+    thread:start(timeouts);
     local function info ()
       return status(co), rawget(thread, "error");
     end


--
- Patrick Donnelly
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: