mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
further improoved http-google-malware.nse malware detection by adding response
code checks.
This commit is contained in:
parent
b0c8a758a0
commit
be858f4a7d
1 changed files with 3 additions and 3 deletions
|
|
@ -77,8 +77,8 @@ action = function(host, port)
|
|||
local req = http.get_url(qry)
|
||||
stdnse.print_debug(2, "%s", qry)
|
||||
|
||||
if ( req.status == 403 ) then
|
||||
return "[ERROR] 403 Forbidden (invalid API key?)"
|
||||
if ( req.status > 400 ) then
|
||||
return "[ERROR] Request failed (invalid API key?)"
|
||||
end
|
||||
|
||||
--The Safe Lookup API responds with a type when site is on the lists
|
||||
|
|
@ -93,7 +93,7 @@ action = function(host, port)
|
|||
end
|
||||
end
|
||||
--For the verbose lovers
|
||||
if nmap.verbosity() >= 2 and not(malware_found) then
|
||||
if req.status == 204 and nmap.verbosity() >= 2 and not(malware_found) then
|
||||
output_lns[#output_lns+1] = "Host is safe to browse."
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue