1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +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

@@ -41,7 +41,7 @@ categories = {"auth", "intrusive"}
portrule = shortport.http
local function fail (err) return stdnse.format_output(false, err) end
action = function(host, port)
@@ -52,21 +52,13 @@ action = function(host, port)
-- speedy exit if no usernames
if(#usernames == 0) then
if(nmap.debugging() > 0) then
return "Didn't find any users to test (should be in nselib/data/usernames.lst)"
else
return nil
end
return fail("Didn't find any users to test (should be in nselib/data/usernames.lst)")
end
-- Check what response we get for a 404
local result, result_404, known_404 = http.identify_404(host, port)
if(result == false) then
if(nmap.debugging() > 0) then
return "ERROR: " .. result_404
else
return nil
end
return fail(result_404)
end
-- Check if we can use HEAD requests
@@ -93,11 +85,7 @@ action = function(host, port)
-- Check for http.pipeline error
if(results == nil) then
stdnse.debug1("http.pipeline returned nil")
if(nmap.debugging() > 0) then
return "ERROR: http.pipeline returned nil"
else
return nil
end
return fail("http.pipeline returned nil")
end
local found = {}