
Nmap Development mailing list archives
Re: [NSE] Lua implementation merged into Nmap trunk
From: jah <jah () zadkiel plus com>
Date: Sun, 05 Apr 2009 22:04:22 +0100
On 05/04/2009 09:11, Patrick Donnelly wrote:
...Because the script engine is now written in Lua, users can also inspect how the engine actually runs their code. Further, because nse_main.lua is recompiled across Nmap invocations, a user can actually change how NSE operates without recompiling Nmap. For example, one could add more debug output when developing scripts among other endless possibilities.
Nice work Patrick, this change is cool and should make hacking NSE a whole lot easier. Thought it might be useful to see the port number in debug output at the start and finishing of a script and have attached a patch. Regards, jah
--- nse_main.lua.orig 2009-04-05 21:38:57.812500000 +0100 +++ nse_main.lua 2009-04-05 21:38:41.796875000 +0100 @@ -368,7 +368,8 @@ print_debug(1, "NSE Script Threads (%d) running:", #threads); while #threads > 0 do local thread = remove(threads); - thread:d("Starting %THREAD against %s.", thread.host.ip) + thread:d("Starting %THREAD against %s%s.", thread.host.ip, + thread.port and ":"..thread.port.number or ""); running[thread.co], total = thread, total + 1; hosts[thread.host] = hosts[thread.host] or {}; hosts[thread.host][thread.co] = true; @@ -433,7 +434,8 @@ cnse.port_set_output(thread.host, thread.port, thread.id, result); end end - thread:d("Finished %THREAD against %s", thread.host.ip); + thread:d("Finished %THREAD against %s%s.", thread.host.ip, + thread.port and ":"..thread.port.number or ""); end -- Any more threads running for this host?
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [NSE] Lua implementation merged into Nmap trunk Patrick Donnelly (Apr 05)
- Re: [NSE] Lua implementation merged into Nmap trunk jah (Apr 05)
- Re: [NSE] Lua implementation merged into Nmap trunk Patrick Donnelly (Apr 27)
- Re: [NSE] Lua implementation merged into Nmap trunk David Fifield (Apr 05)
- Re: [NSE] Lua implementation merged into Nmap trunk jah (Apr 05)