1
0
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:
batrick
2014-08-03 00:56:45 +00:00
parent a809f52d5d
commit ee6622aea4
67 changed files with 1092 additions and 1092 deletions

View File

@@ -169,7 +169,7 @@ Client = {
self.socket:set_timeout(self.timeout)
local status = self.socket:connect(self.host, self.port)
if ( not(status) ) then
stdnse.print_debug(2, "Failed to connect to the server: %s", self.host.ip)
stdnse.debug2("Failed to connect to the server: %s", self.host.ip)
return false, ("Failed to connect to the server: %s"):format(self.host.ip)
end
return true
@@ -210,7 +210,7 @@ Client = {
-- check if send was successful, in case it wasn't AND
-- this is our last retry, ABORT
if ( not(status) and 0 == retries - 1 ) then
stdnse.print_debug(2, "Failed to send request to server (%s)", err)
stdnse.debug2("Failed to send request to server (%s)", err)
return false, ("Failed to send request to server (%s)"):format(err)
-- if send was successful, attempt to receive the response
elseif ( status ) then
@@ -224,7 +224,7 @@ Client = {
local status, err = self:connect()
-- if re-connect fails, BAIL out of here
if ( not(status) ) then
stdnse.print_debug(2, "Failed to reconnect socket to server (%s)", err)
stdnse.debug2("Failed to reconnect socket to server (%s)", err)
return false, ("Failed to reconnect socket to server (%s)"):format(err)
end
end
@@ -232,7 +232,7 @@ Client = {
until( status or retries == 0 )
if( not(status) ) then
stdnse.print_debug(2, "Failed to receive response from server (%s)", data)
stdnse.debug2("Failed to receive response from server (%s)", data)
return false, ("Failed to receive response from server (%s)"):format(data)
end