diff --git a/CHANGELOG b/CHANGELOG index 8f7bf51d6..c6dc9ef0b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # 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 even if -sV wasn't used. This information can be set by scripts in the absence of -sV. [Daniel Miller] diff --git a/nse_main.lua b/nse_main.lua index 595e8db24..8fd4aab1f 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -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