Nmap Development mailing list archives

NSE CLI debugger


From: Diman Todorov <diman.todorov () univie ac at>
Date: Sun, 3 Feb 2008 15:30:49 +0100

Hello,

I've taken the freedom and added a new feature to NSE - a command line  
debugger for scripts.

The debugger is loaded by adding the --script-debug flag on the  
command line. You set breakpoints like this:

... (your code) ...
pause("breakpoint description") -- your breakpoint
... (your code) ...

since the breakpoint is just lua code, you can do conditional  
breakpoints like this:

if(condition)
        pause("oops")

the debugger prompt itself should be self explanatory.

I've added a breakpoint to showHTMLtitle.nse for demonstration  
purposes. If you run

./nmap --script=scripts/showHTMLtitle.nse www.google.com -p 80 -- 
script-debug

with the latest svn revision you should get the debugger prompt.

Feel free to play around. If there are reasons speaking against a CLI  
debugger, I'll remove it again. If you like the debugger, I'll  
document it :)

cheers,
Diman
P.S. credit for the debugger code goes to the kepler project, I've  
just integrated it with NSE

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


Current thread: