1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-19 12:49:02 +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

@@ -99,6 +99,7 @@ Driver =
}
local function fail (err) return stdnse.format_output(false, err) end
action = function(host, port)
@@ -106,9 +107,9 @@ action = function(host, port)
-- authentication mechanisms can be determined
local helper = imap.Helper:new(host, port)
local status = helper:connect()
if (not(status)) then return "\n ERROR: Failed to connect to the server." end
if (not(status)) then return fail("Failed to connect to the server.") end
local status, capabilities = helper:capabilities()
if (not(status)) then return "\n ERROR: Failed to retrieve capabilities." end
if (not(status)) then return fail("Failed to retrieve capabilities.") end
-- check if an authentication mechanism was provided or try
-- try them in the mech_prio order
@@ -129,7 +130,7 @@ action = function(host, port)
-- if no mechanisms were found, abort
if ( not(mech) ) then
return "\n ERROR: No suitable authentication mechanism was found"
return fail("No suitable authentication mechanism was found")
end
local engine = brute.Engine:new(Driver, host, port)