mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 02:49:01 +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:
@@ -49,6 +49,12 @@ action = function(host, port)
|
||||
return stdnse.format_output(false, "Unknown pages return a 302 response; unable to check")
|
||||
end
|
||||
|
||||
-- Identify servers that answer 200 to invalid HTTP requests and exit as these would invalidate the test
|
||||
if ( result_404 == 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
|
||||
|
||||
-- Perform a GET request on the file
|
||||
result = http.get_url("http://" .. host.ip .. ":" .. port.number .. "/ts/in.cgi?open2")
|
||||
if(not(result)) then
|
||||
@@ -73,4 +79,3 @@ action = function(host, port)
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user