1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 17:59:04 +00:00

Would crash when an http service returned no response status. Fixed

that.
This commit is contained in:
gyani
2015-08-01 21:08:22 +00:00
parent aa359738c1
commit 97e4e55f31

View File

@@ -157,7 +157,13 @@ action = function(host, port)
end
local random_resp = http.generic_request(host, port, stdnse.generate_random_string(4), path)
stdnse.debug1("Response Code to Random Method is %d", random_resp.status or nil)
if random_resp.status then
stdnse.debug1("Response Code to Random Method is %d", random_resp.status)
else
stdnse.debug1("Random Method %s failed.", path)
end
for _, method in pairs(to_test) do
response = http.generic_request(host, port, method, path)
if response.status and check_allowed(random_resp, response) then