mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
nselib stdnse.print_debug -> stdnse.debug
$ f() { find -name \*.lua -exec /bin/echo sed -i "$1" {} \; ; }
$ f 's/stdnse.print_debug( *\([0-9]*\) *, */stdnse.debug\1(/'
$ f 's/stdnse.print_debug( *"\(.*\))/stdnse.debug1("\1)/'
This commit is contained in:
@@ -82,7 +82,7 @@ add = function (...)
|
||||
-- Force the check here, but it would be better if scripts
|
||||
-- check ALLOW_NEW_TARGETS before calling target.add()
|
||||
if not ALLOW_NEW_TARGETS then
|
||||
stdnse.print_debug(1,
|
||||
stdnse.debug1(
|
||||
"ERROR: to add targets run with --script-args 'newtargets'")
|
||||
return false, "to add targets run with --script-args 'newtargets'"
|
||||
end
|
||||
@@ -97,7 +97,7 @@ add = function (...)
|
||||
new_targets.count = calc_max_targets(new_targets.count)
|
||||
|
||||
if new_targets.count == 0 then
|
||||
stdnse.print_debug(3,
|
||||
stdnse.debug3(
|
||||
"Warning: Maximum new targets reached, no more new targets.")
|
||||
return false, "Maximum new targets reached, no more new targets."
|
||||
end
|
||||
@@ -105,7 +105,7 @@ add = function (...)
|
||||
local hosts, err = nmap.add_targets(table.unpack(new_targets,1,new_targets.count))
|
||||
|
||||
if hosts == 0 then
|
||||
stdnse.print_debug(3, "%s", err)
|
||||
stdnse.debug3("%s", err)
|
||||
return false, err
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user