mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 10:59:02 +00:00
Modified multiple scripts that operated against HTTP based services so as to remove false positives that were generated when the target service answers with a 200 response to all requests.
Some scripts that had been previously modified were updated so that the debug output was consistent. A few scripts were calling identify_404 with host.ip as opposed to the proper host object. This has been adjusted as well.
This commit is contained in:
@@ -113,6 +113,13 @@ action = function(host, port)
|
||||
return
|
||||
end
|
||||
|
||||
-- Identify servers that answer 200 to invalid HTTP requests and exit as these would invalidate the tests
|
||||
local _, http_status, _ = http.identify_404(host,port)
|
||||
if ( http_status == 200 ) then
|
||||
stdnse.print_debug(1, "%s: Exiting due to ambiguous response from web server on %s:%s. All URIs return status 200.", SCRIPT_NAME, host.ip, port.number)
|
||||
return false
|
||||
end
|
||||
|
||||
-- Silently abort if the server responds as anything different than
|
||||
-- MochiWeb
|
||||
if ( response.header['server'] and
|
||||
@@ -135,4 +142,4 @@ action = function(host, port)
|
||||
end
|
||||
return stdnse.format_output(true, tab.dump(result))
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user