Nmap Development mailing list archives

Re: Getting a stack trace


From: "Patrick Donnelly" <batrick.donnelly () gmail com>
Date: Mon, 15 Dec 2008 20:30:35 -0700

On Mon, Dec 15, 2008 at 7:32 PM, Ron <ron () skullsecurity net> wrote:
Hi all,

I've brought this up before, but I'm not sure if anything ever happened
with it and it's pretty important.

Could the script engine be changed to display a stacktrace when an error
happens (only if debug mode is enabled would be good)?

Me and Brandon are trying to debug an error that shows up in
stdnse.print_debug(), but, because print_debug() is called from just
about every function in my code, it's incredibly difficult to trace it
back. I've run into this issue before, too, but normally I can trace it
back by looking at the code I'd just written, but when it shows up later
in testing that isn't feasable.

So yeah, any chance of somebody writing that?

Hi Ron,

Until this is figured out you may use the following script
traceback.nse to get tracebacks on failed scripts provided the scripts
you wish to perform a traceback on create a TRACEBACK global table and
insert its thread into the table (see test.nse attached for example).

Cheers,

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant

Attachment: test.nse
Description:

Attachment: traceback.nse
Description:


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

Current thread: