diff --git a/scripts/afp-ls.nse b/scripts/afp-ls.nse index 8ace0e482..b156c8415 100644 --- a/scripts/afp-ls.nse +++ b/scripts/afp-ls.nse @@ -97,7 +97,7 @@ action = function(host, port) local status, response = afpHelper:OpenSession(host, port) if ( not status ) then - stdnse.print_debug(response) + stdnse.debug1("%s", response) return end diff --git a/scripts/afp-path-vuln.nse b/scripts/afp-path-vuln.nse index 5aec5f990..2d34886dc 100644 --- a/scripts/afp-path-vuln.nse +++ b/scripts/afp-path-vuln.nse @@ -165,7 +165,7 @@ Directory traversal vulnerability in AFP Server in Apple Mac OS X before status, response = afp_helper:OpenSession(host, port) if ( not(status) ) then - stdnse.print_debug(response) + stdnse.debug1("%s", response) return end diff --git a/scripts/afp-showmount.nse b/scripts/afp-showmount.nse index 851c9fc04..f73018461 100644 --- a/scripts/afp-showmount.nse +++ b/scripts/afp-showmount.nse @@ -60,7 +60,7 @@ action = function(host, port) status, response = afpHelper:OpenSession(host, port) if ( not status ) then - stdnse.print_debug(response) + stdnse.debug1("%s", response) return end diff --git a/scripts/domino-enum-users.nse b/scripts/domino-enum-users.nse index d54619c08..5cd5b907e 100644 --- a/scripts/domino-enum-users.nse +++ b/scripts/domino-enum-users.nse @@ -109,7 +109,7 @@ action = function(host, port) if ( status ) then table.insert(result, ("Successfully stored \"%s\" in %s"):format(username, filename) ) else - stdnse.print_debug( err ) + stdnse.debug1("%s", err) table.insert(result, ("Failed to store \"%s\" to %s"):format(username, filename) ) end elseif( status and data ) then diff --git a/scripts/ldap-brute.nse b/scripts/ldap-brute.nse index a7dc9a482..c6c198671 100644 --- a/scripts/ldap-brute.nse +++ b/scripts/ldap-brute.nse @@ -303,7 +303,7 @@ action = function( host, port ) local output_file = output_prefix .. "_" .. host.ip .. "_" .. port.number status, err = credTable:saveToFile(output_file,output_type) if not status then - stdnse.print_debug(err) + stdnse.debug1("%s", err) end end diff --git a/scripts/ldap-search.nse b/scripts/ldap-search.nse index 559e823c7..6e54db0c7 100644 --- a/scripts/ldap-search.nse +++ b/scripts/ldap-search.nse @@ -251,7 +251,7 @@ function action(host,port) local output_file = saveFile .. "_" .. host.ip .. "_" .. port.number .. ".csv" local save_status, save_err = ldap.searchResultToFile(searchResEntries,output_file) if not save_status then - stdnse.print_debug(save_err) + stdnse.debug1("%s", save_err) end end diff --git a/scripts/metasploit-info.nse b/scripts/metasploit-info.nse index 3e61ab0df..e68941cc6 100644 --- a/scripts/metasploit-info.nse +++ b/scripts/metasploit-info.nse @@ -153,7 +153,7 @@ local get_version = function(host, port, token) else -- mingw compiler means it's a windows build os_type = "windows" end - stdnse.print_debug(info) + stdnse.debug1("%s", info) return info end end @@ -247,7 +247,7 @@ action = function( host, port ) local console_id = create_console(host,port,token) if console_id then local read_data = read_console(host,port,token,console_id) -- first read the banner/ascii art - stdnse.print_debug(2,read_data) -- print the nice looking banner if dbg level high enough :) + stdnse.debug2("%s", read_data) -- print the nice looking banner if dbg level high enough :) if read_data then if os_type == "linux" then read_data = write_read_console(host,port,token,console_id, "uname -a") @@ -261,7 +261,7 @@ action = function( host, port ) elseif os_type == "windows" then read_data = write_read_console(host,port,token,console_id, "systeminfo") if read_data then - stdnse.print_debug(2,read_data) -- print whole info if dbg level high enough + stdnse.debug2("%s", read_data) -- print whole info if dbg level high enough local stop = string.find(read_data,"Hotfix") -- trim data down , systeminfo return A LOT read_data = string.sub(read_data,1,stop-2) info = info .. "\nAdditional info: \n" .. read_data diff --git a/scripts/ms-sql-tables.nse b/scripts/ms-sql-tables.nse index 04557657b..f48645d33 100644 --- a/scripts/ms-sql-tables.nse +++ b/scripts/ms-sql-tables.nse @@ -186,7 +186,7 @@ local function process_instance( instance ) query = query:format( v[1], v[1], v[1], tbl_limit, v[1], keywords_filter) status, tables = helper:Query( query ) if ( not(status) ) then - stdnse.print_debug(tables) + stdnse.debug1("%s", tables) else local item = {} item = mssql.Util.FormatOutputTable( tables, true ) diff --git a/scripts/mysql-empty-password.nse b/scripts/mysql-empty-password.nse index 1d6914483..47dc378da 100644 --- a/scripts/mysql-empty-password.nse +++ b/scripts/mysql-empty-password.nse @@ -44,7 +44,7 @@ action = function( host, port ) status, response = mysql.receiveGreeting( socket ) if ( not(status) ) then - stdnse.print_debug(3, SCRIPT_NAME) + stdnse.debug3("%s", SCRIPT_NAME) socket:close() return response end diff --git a/scripts/smb-mbenum.nse b/scripts/smb-mbenum.nse index f94a1be66..fdd23b938 100644 --- a/scripts/smb-mbenum.nse +++ b/scripts/smb-mbenum.nse @@ -64,7 +64,7 @@ categories = {"discovery", "safe"} hostrule = function(host) return smb.get_port(host) ~= nil end -local function log(msg) stdnse.print_debug(3, msg) end +local function log(msg) stdnse.debug3("%s", msg) end ServerTypes = { SV_TYPE_WORKSTATION = 0x00000001, diff --git a/scripts/ssl-known-key.nse b/scripts/ssl-known-key.nse index df09c6bbe..357bcbb9b 100644 --- a/scripts/ssl-known-key.nse +++ b/scripts/ssl-known-key.nse @@ -111,7 +111,7 @@ action = function(host, port) local path = stdnse.get_script_args("ssl-known-key.fingerprintfile") or FINGERPRINT_FILE local status, result = get_fingerprints(path) if not status then - stdnse.print_debug(1, result) + stdnse.debug1("%s", result) return end local fingerprints = result