Nmap Development mailing list archives
Re: [NSE] Getting a backtrace?
From: Ron <ron () skullsecurity net>
Date: Sat, 25 Oct 2008 14:13:21 -0500
Patrick Donnelly wrote:
On Fri, Oct 24, 2008 at 8:47 AM, Ron <ron () skullsecurity net> wrote:
As of right now NSE does not print out a backtrace (it could easily if
there is a general desire for this). You can get the information when
debugging by hooking your action function (emphasis on "when
debugging") like so:
function action (host, port)
-- your script does stuff
end
-- ... other stuff in file
local real_action = action;
function action (...)
local t = {n = select("#", ...), ...};
local status, ret = xpcall(function() return real_action(unpack(t,
1, t.n)) end,
debug.traceback)
if not status then error(ret) end
return ret
end
Cheers,
So, I implemented that in one of my scripts, to see how it works, and I
am getting this error message:
SCRIPT ENGINE: ./scripts/smb-enumusers.nse:501: attempt to yield across
metamethod/C-call boundary
stack traceback:
[C]: in function 'connect'
[string "local yield, connect, socket_lock = ...;..."]:6: in
function 'connect'
It looks like it's getting an error inside the connect() function. Is
there a bug in the implementation of connect(), or is something else
going on here?
--
Ron Bowes
http://www.skullsecurity.org/
http://www.javaop.com/
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Current thread:
- [NSE] Getting a backtrace? Ron (Oct 24)
- Re: [NSE] Getting a backtrace? Kris Katterjohn (Oct 24)
- Re: [NSE] Getting a backtrace? Patrick Donnelly (Oct 24)
- Re: [NSE] Getting a backtrace? Ron (Oct 24)
- Re: [NSE] Getting a backtrace? Ron (Oct 25)
- Re: [NSE] Getting a backtrace? Patrick Donnelly (Oct 25)
