1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-31 11:59:03 +00:00

Remove many ERROR outputs from non-debug NSE output

This commit is contained in:
dmiller
2015-08-27 20:43:55 +00:00
parent fb5c947453
commit 7852fa3c18
137 changed files with 334 additions and 380 deletions

View File

@@ -151,6 +151,8 @@ local function go(host, port)
return true, results, is_vulnerable
end
local function fail (err) return stdnse.format_output(false, err) end
action = function(host, port)
-- Start by checking if '/' is protected -- if it is, we can't do the tests
local result = go_single(host, port, "/")
@@ -179,7 +181,7 @@ action = function(host, port)
else
stdnse.debug1("PROPFIND request failed.")
end
return nmap.verbosity() > 0 and "ERROR: This web server is not supported." or nil
return fail("This web server is not supported.")
end
end
@@ -200,7 +202,7 @@ action = function(host, port)
local status, results, is_vulnerable = go(host, port)
if(status == false) then
return nmap.verbosity() > 0 and "ERROR: " .. results or nil
return fail(results)
else
if(#results == 0) then
if(is_vulnerable == false) then