1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

o [NSE] Added an error message indicating script failure, when Nmap is being

run in non verbose/debug mode. [Patrik Karlsson]
This commit is contained in:
patrik
2012-04-04 21:11:20 +00:00
parent b023f71618
commit 59b30bacf8
2 changed files with 9 additions and 2 deletions

View File

@@ -882,8 +882,12 @@ local function run (threads_iter, hosts)
local s, result = resume(co, unpack(thread.args, 1, thread.args.n));
if not s then -- script error...
all[co], num_threads = nil, num_threads-1;
thread:d("%THREAD_AGAINST threw an error!\n%s\n",
traceback(co, tostring(result)));
if debugging() > 0 then
thread:d("%THREAD_AGAINST threw an error!\n%s\n",
traceback(co, tostring(result)));
else
thread:set_output("ERROR: Script execution failed (use -d to debug)");
end
thread:close(timeouts, result);
elseif status(co) == "suspended" then
if result == NSE_YIELD_VALUE then