1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

further improoved http-google-malware.nse malware detection by adding response

code checks.
This commit is contained in:
patrik
2012-07-24 10:33:39 +00:00
parent b0c8a758a0
commit be858f4a7d

View File

@@ -77,8 +77,8 @@ action = function(host, port)
local req = http.get_url(qry) local req = http.get_url(qry)
stdnse.print_debug(2, "%s", qry) stdnse.print_debug(2, "%s", qry)
if ( req.status == 403 ) then if ( req.status > 400 ) then
return "[ERROR] 403 Forbidden (invalid API key?)" return "[ERROR] Request failed (invalid API key?)"
end end
--The Safe Lookup API responds with a type when site is on the lists --The Safe Lookup API responds with a type when site is on the lists
@@ -93,7 +93,7 @@ action = function(host, port)
end end
end end
--For the verbose lovers --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." output_lns[#output_lns+1] = "Host is safe to browse."
end end