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

stdnse.print_debug -> stdnse.debug1

sed -i 's/stdnse.print_debug("%s: \([^"]*\)", SCRIPT_NAME/stdnse.debug1("\1"/' *.nse
This commit is contained in:
batrick
2014-08-01 21:31:04 +00:00
parent 5161b8642a
commit c94d5970ff
21 changed files with 46 additions and 46 deletions

View File

@@ -52,7 +52,7 @@ end
-- made so no more requests are made to the server during one scan
action = function(host)
if nmap.registry["ip-geolocation-geobytes"] and nmap.registry["ip-geolocation-geobytes"].blocked then
stdnse.print_debug("%s: 20 requests per hour Limit Exceeded", SCRIPT_NAME)
stdnse.debug1("20 requests per hour Limit Exceeded")
return nil
end
local response = http.get("www.geobytes.com", 80, "/IpLocator.htm?GetLocation&template=json.txt&IpAddress="..host.ip, nil)
@@ -63,7 +63,7 @@ action = function(host)
if loc.city and loc.city == "Limit Exceeded" then
if not nmap.registry["ip-geolocation-geobytes"] then nmap.registry["ip-geolocation-geobytes"]={} end
nmap.registry["ip-geolocation-geobytes"].blocked = true
stdnse.print_debug("%s: 20 requests per hour Limit Exceeded", SCRIPT_NAME)
stdnse.debug1("20 requests per hour Limit Exceeded")
return nil
end
-- Process output
@@ -80,7 +80,7 @@ action = function(host)
elseif response.body:match("Limit Exceeded") then
if not nmap.registry["ip-geolocation-geobytes"] then nmap.registry["ip-geolocation-geobytes"]={} end
nmap.registry["ip-geolocation-geobytes"].blocked = true
stdnse.print_debug("%s: 20 requests per hour Limit Exceeded", SCRIPT_NAME)
stdnse.debug1("20 requests per hour Limit Exceeded")
return nil
end
return nil