mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Clean up response matching and avoid requiring string lib
This commit is contained in:
@@ -109,8 +109,9 @@ end
|
||||
action = function(host,port)
|
||||
local response = http.get(host,port,"/xmldata?item=all")
|
||||
if response["status"] ~= 200
|
||||
or string.match(response["body"], '<RIMP>') == nil
|
||||
or string.match(response["body"], 'iLO') == nil
|
||||
or not response.body
|
||||
or not response.body:match('<RIMP>')
|
||||
or not response.body:match('iLO')
|
||||
then
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user