mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Move last remnants of Lua 5.0 "arg' table.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user