mirror of
https://github.com/nmap/nmap.git
synced 2026-02-08 06:26:33 +00:00
more stdnse.print_debug -> stdnse.debug
This is a catchall pattern with a few exclusions. $ sed -i 's/stdnse.print_debug( *\([0-9]*\) *, *\(.*\))/stdnse.debug\1(\2)/' *.nse $ sed -i 's/stdnse.print_debug(\(.*\))/stdnse.debug1(\1)/' *.nse Excluded: $ svn revert db2-das-info.nse $ svn revert flume-master-info.nse $ svn revert http-headers.nse $ svn revert http-methods.nse $ svn revert http-unsafe-output-escaping.nse $ svn revert http-userdir-enum.nse $ svn revert http-vuln-cve2011-3192.nse $ svn revert http-vuln-wnr1000-creds.nse $ svn revert http-wordpress-plugins.nse $ svn revert telnet-brute.nse
This commit is contained in:
@@ -50,7 +50,7 @@ action = function()
|
||||
sock:set_timeout(2 * DROPBOX_BROADCAST_PERIOD * 1000)
|
||||
local status, result = sock:bind(nil, DROPBOX_PORT)
|
||||
if not status then
|
||||
stdnse.print_debug(1, "Could not bind on port %d: %s", DROPBOX_PORT, result)
|
||||
stdnse.debug1("Could not bind on port %d: %s", DROPBOX_PORT, result)
|
||||
sock:close()
|
||||
return
|
||||
end
|
||||
@@ -78,10 +78,10 @@ action = function()
|
||||
-- Get IP address of broadcasting host.
|
||||
local status, _, _, ip, _ = sock:get_info()
|
||||
if not status then
|
||||
stdnse.print_debug(1, "Failed to get socket info.")
|
||||
stdnse.debug1("Failed to get socket info.")
|
||||
break
|
||||
end
|
||||
stdnse.print_debug(1, "Received broadcast from host %s (%s).", info.displayname, ip)
|
||||
stdnse.debug1("Received broadcast from host %s (%s).", info.displayname, ip)
|
||||
|
||||
-- Check if we've already seen this ID.
|
||||
if ids[info.host_int] then
|
||||
@@ -114,7 +114,7 @@ action = function()
|
||||
stdnse.strjoin(", ", info.namespaces)
|
||||
)
|
||||
|
||||
stdnse.print_debug(1, "Added host %s.", info.displayname)
|
||||
stdnse.debug1("Added host %s.", info.displayname)
|
||||
end
|
||||
|
||||
status, result = sock:receive()
|
||||
|
||||
Reference in New Issue
Block a user