mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
further improoved http-google-malware.nse malware detection by adding response
code checks.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user