diff --git a/scripts/http-google-malware.nse b/scripts/http-google-malware.nse index dc5c4c221..5a6988fd1 100644 --- a/scripts/http-google-malware.nse +++ b/scripts/http-google-malware.nse @@ -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