mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 11:22:05 +00:00
Use a simpler method of getting the status.
The old way would crash if the HTTP request failed, in trying to strsplit a nil value.
This commit is contained in:
parent
ec269ece29
commit
1005f19805
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ end
|
|||
|
||||
function ServiceProxy:remote(req)
|
||||
local httpdata = http.post(self.host, self.port, self.path, self.options, nil, req)
|
||||
if stdnse.strsplit(" ", httpdata["status-line"])[2] ~= "200" then
|
||||
if httpdata.status ~= 200 then
|
||||
return
|
||||
end
|
||||
local body = httpdata["body"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue