diff --git a/nselib/json.lua b/nselib/json.lua index 233122b96..fd86f62e2 100644 --- a/nselib/json.lua +++ b/nselib/json.lua @@ -32,18 +32,18 @@ _ENV = stdnse.module("json", stdnse.seeall) --Some local shortcuts local function dbg(str,...) - stdnse.print_debug("Json:"..str, table.unpack(arg)) + stdnse.print_debug("Json:"..str, ...) end local function d4(str,...) - if nmap.debugging() > 3 then dbg(str,table.unpack(arg)) end + if nmap.debugging() > 3 then dbg(str, ...) end end local function d3(str,...) - if nmap.debugging() > 2 then dbg(str,table.unpack(arg)) end + if nmap.debugging() > 2 then dbg(str, ...) end end --local dbg =stdnse.print_debug local function dbg_err(str,...) - stdnse.print_debug("json-ERR:"..str, table.unpack(arg)) + stdnse.print_debug("json-ERR:"..str, ...) end -- Javascript null representation, see explanation above diff --git a/nselib/mongodb.lua b/nselib/mongodb.lua index acd43bd64..8892f3de4 100644 --- a/nselib/mongodb.lua +++ b/nselib/mongodb.lua @@ -28,7 +28,7 @@ local arg_DB = stdnse.get_script_args("mongodb.db") -- Some lazy shortcuts local function dbg(str,...) - stdnse.print_debug(3, "MngoDb:"..str, table.unpack(arg)) + stdnse.print_debug(3, "MngoDb:"..str, ...) end --local dbg =stdnse.print_debug @@ -55,7 +55,7 @@ local err =stdnse.print_debug --module("bson", package.seeall) --require("bin") local function dbg_err(str,...) - stdnse.print_debug("Bson-ERR:"..str, table.unpack(arg)) + stdnse.print_debug("Bson-ERR:"..str, ...) end --local err =stdnse.log_error diff --git a/scripts/bitcoinrpc-info.nse b/scripts/bitcoinrpc-info.nse index f890a7949..6c803b875 100644 --- a/scripts/bitcoinrpc-info.nse +++ b/scripts/bitcoinrpc-info.nse @@ -64,7 +64,7 @@ function ServiceProxy:new(host, port, path, options) self.options = options self.__index = function(_, method) return function(...) - return self:call(method, arg) + return self:call(method, table.pack(...)) end end return o diff --git a/scripts/couchdb-databases.nse b/scripts/couchdb-databases.nse index f7c521d8c..e596bf410 100644 --- a/scripts/couchdb-databases.nse +++ b/scripts/couchdb-databases.nse @@ -39,7 +39,7 @@ categories = {"discovery", "safe"} portrule = shortport.port_or_service({5984}) -- Some lazy shortcuts local function dbg(str,...) - stdnse.print_debug("couchdb-get-tables:"..str, table.unpack(arg)) + stdnse.print_debug("couchdb-get-tables:"..str, ...) end local DISCARD = {} diff --git a/scripts/couchdb-stats.nse b/scripts/couchdb-stats.nse index 3d84f7c70..58264a542 100644 --- a/scripts/couchdb-stats.nse +++ b/scripts/couchdb-stats.nse @@ -51,7 +51,7 @@ categories = {"discovery", "safe"} portrule = shortport.port_or_service({5984}) -- Some lazy shortcuts local function dbg(str,...) - stdnse.print_debug("couchdb-stats:"..str, table.unpack(arg)) + stdnse.print_debug("couchdb-stats:"..str, ...) end diff --git a/scripts/http-open-redirect.nse b/scripts/http-open-redirect.nse index b218c67ea..5963c2e60 100644 --- a/scripts/http-open-redirect.nse +++ b/scripts/http-open-redirect.nse @@ -44,7 +44,7 @@ categories = {"discovery", "intrusive"} portrule = shortport.http local function dbg(str,...) - stdnse.print_debug(2,"http-open-redirect:"..str, table.unpack(arg)) + stdnse.print_debug(2,"http-open-redirect:"..str, ...) end local function dbgt(tbl) for k,v in pairs(tbl) do diff --git a/scripts/http-unsafe-output-escaping.nse b/scripts/http-unsafe-output-escaping.nse index 729ce422f..766daecae 100644 --- a/scripts/http-unsafe-output-escaping.nse +++ b/scripts/http-unsafe-output-escaping.nse @@ -47,7 +47,7 @@ categories = {"discovery", "intrusive"} portrule = shortport.http local function dbg(str,...) - stdnse.print_debug(2,"%s:"..str, SCRIPT_NAME, table.unpack(arg)) + stdnse.print_debug(2,"%s:"..str, SCRIPT_NAME, ...) end local function getHostPort(parsed) diff --git a/scripts/rmi-dumpregistry.nse b/scripts/rmi-dumpregistry.nse index 3f415cdf6..f42d7a857 100644 --- a/scripts/rmi-dumpregistry.nse +++ b/scripts/rmi-dumpregistry.nse @@ -155,11 +155,11 @@ portrule = shortport.port_or_service({1098, 1099, 1090, 8901, 8902, 8903}, {"jav -- Some lazy shortcuts local function dbg(str,...) - stdnse.print_debug(3,"RMI-DUMPREG:"..str, table.unpack(arg)) + stdnse.print_debug(3,"RMI-DUMPREG:"..str, ...) end local function dbg_err(str, ... ) - stdnse.print_debug("RMI-DUMPREG-ERR:"..str, table.unpack(arg)) + stdnse.print_debug("RMI-DUMPREG-ERR:"..str, ...) end -- Function to split a string