1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-17 13:09:02 +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

@@ -1,5 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o [NSE] Added an error message indicating script failure, when Nmap is being
run in non verbose/debug mode. [Patrik Karlsson]
o Service-scan information is now included in XML and grepable output o Service-scan information is now included in XML and grepable output
even if -sV wasn't used. This information can be set by scripts in the even if -sV wasn't used. This information can be set by scripts in the
absence of -sV. [Daniel Miller] absence of -sV. [Daniel Miller]

View File

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