mirror of
https://github.com/nmap/nmap.git
synced 2025-12-10 09:49:05 +00:00
Would crash when an http service returned no response status. Fixed
that.
This commit is contained in:
@@ -157,7 +157,13 @@ action = function(host, port)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local random_resp = http.generic_request(host, port, stdnse.generate_random_string(4), path)
|
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
|
for _, method in pairs(to_test) do
|
||||||
response = http.generic_request(host, port, method, path)
|
response = http.generic_request(host, port, method, path)
|
||||||
if response.status and check_allowed(random_resp, response) then
|
if response.status and check_allowed(random_resp, response) then
|
||||||
|
|||||||
Reference in New Issue
Block a user