mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 12:41:29 +00:00
Makes sure that the script fails if the HTTP request did. Closes #1046
This commit is contained in:
@@ -57,14 +57,10 @@ action = function(host, port)
|
||||
request_type = "GET"
|
||||
end
|
||||
|
||||
if(result == nil) then
|
||||
if not (result and result.status) then
|
||||
return fail("Header request failed")
|
||||
end
|
||||
|
||||
if(result.rawheader == nil) then
|
||||
return fail("Header request didn't return a proper header")
|
||||
end
|
||||
|
||||
table.insert(result.rawheader, "(Request type: " .. request_type .. ")")
|
||||
|
||||
return stdnse.format_output(true, result.rawheader)
|
||||
|
||||
Reference in New Issue
Block a user