mirror of
https://github.com/nmap/nmap.git
synced 2026-06-09 17:22:26 +00:00
Makes sure that the script fails if the HTTP request did. Closes #1046
This commit is contained in:
parent
b437d9784f
commit
8366c90893
2 changed files with 4 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue