mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 05:31:31 +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
|
--Some local shortcuts
|
||||||
local function dbg(str,...)
|
local function dbg(str,...)
|
||||||
stdnse.print_debug("Json:"..str, table.unpack(arg))
|
stdnse.print_debug("Json:"..str, ...)
|
||||||
end
|
end
|
||||||
local function d4(str,...)
|
local function d4(str,...)
|
||||||
if nmap.debugging() > 3 then dbg(str,table.unpack(arg)) end
|
if nmap.debugging() > 3 then dbg(str, ...) end
|
||||||
end
|
end
|
||||||
local function d3(str,...)
|
local function d3(str,...)
|
||||||
if nmap.debugging() > 2 then dbg(str,table.unpack(arg)) end
|
if nmap.debugging() > 2 then dbg(str, ...) end
|
||||||
end
|
end
|
||||||
|
|
||||||
--local dbg =stdnse.print_debug
|
--local dbg =stdnse.print_debug
|
||||||
local function dbg_err(str,...)
|
local function dbg_err(str,...)
|
||||||
stdnse.print_debug("json-ERR:"..str, table.unpack(arg))
|
stdnse.print_debug("json-ERR:"..str, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Javascript null representation, see explanation above
|
-- Javascript null representation, see explanation above
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ local arg_DB = stdnse.get_script_args("mongodb.db")
|
|||||||
-- Some lazy shortcuts
|
-- Some lazy shortcuts
|
||||||
|
|
||||||
local function dbg(str,...)
|
local function dbg(str,...)
|
||||||
stdnse.print_debug(3, "MngoDb:"..str, table.unpack(arg))
|
stdnse.print_debug(3, "MngoDb:"..str, ...)
|
||||||
end
|
end
|
||||||
--local dbg =stdnse.print_debug
|
--local dbg =stdnse.print_debug
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ local err =stdnse.print_debug
|
|||||||
--module("bson", package.seeall)
|
--module("bson", package.seeall)
|
||||||
--require("bin")
|
--require("bin")
|
||||||
local function dbg_err(str,...)
|
local function dbg_err(str,...)
|
||||||
stdnse.print_debug("Bson-ERR:"..str, table.unpack(arg))
|
stdnse.print_debug("Bson-ERR:"..str, ...)
|
||||||
end
|
end
|
||||||
--local err =stdnse.log_error
|
--local err =stdnse.log_error
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ function ServiceProxy:new(host, port, path, options)
|
|||||||
self.options = options
|
self.options = options
|
||||||
self.__index = function(_, method)
|
self.__index = function(_, method)
|
||||||
return function(...)
|
return function(...)
|
||||||
return self:call(method, arg)
|
return self:call(method, table.pack(...))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return o
|
return o
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ categories = {"discovery", "safe"}
|
|||||||
portrule = shortport.port_or_service({5984})
|
portrule = shortport.port_or_service({5984})
|
||||||
-- Some lazy shortcuts
|
-- Some lazy shortcuts
|
||||||
local function dbg(str,...)
|
local function dbg(str,...)
|
||||||
stdnse.print_debug("couchdb-get-tables:"..str, table.unpack(arg))
|
stdnse.print_debug("couchdb-get-tables:"..str, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
local DISCARD = {}
|
local DISCARD = {}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ categories = {"discovery", "safe"}
|
|||||||
portrule = shortport.port_or_service({5984})
|
portrule = shortport.port_or_service({5984})
|
||||||
-- Some lazy shortcuts
|
-- Some lazy shortcuts
|
||||||
local function dbg(str,...)
|
local function dbg(str,...)
|
||||||
stdnse.print_debug("couchdb-stats:"..str, table.unpack(arg))
|
stdnse.print_debug("couchdb-stats:"..str, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ categories = {"discovery", "intrusive"}
|
|||||||
portrule = shortport.http
|
portrule = shortport.http
|
||||||
|
|
||||||
local function dbg(str,...)
|
local function dbg(str,...)
|
||||||
stdnse.print_debug(2,"http-open-redirect:"..str, table.unpack(arg))
|
stdnse.print_debug(2,"http-open-redirect:"..str, ...)
|
||||||
end
|
end
|
||||||
local function dbgt(tbl)
|
local function dbgt(tbl)
|
||||||
for k,v in pairs(tbl) do
|
for k,v in pairs(tbl) do
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ categories = {"discovery", "intrusive"}
|
|||||||
portrule = shortport.http
|
portrule = shortport.http
|
||||||
|
|
||||||
local function dbg(str,...)
|
local function dbg(str,...)
|
||||||
stdnse.print_debug(2,"%s:"..str, SCRIPT_NAME, table.unpack(arg))
|
stdnse.print_debug(2,"%s:"..str, SCRIPT_NAME, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function getHostPort(parsed)
|
local function getHostPort(parsed)
|
||||||
|
|||||||
@@ -155,11 +155,11 @@ portrule = shortport.port_or_service({1098, 1099, 1090, 8901, 8902, 8903}, {"jav
|
|||||||
-- Some lazy shortcuts
|
-- Some lazy shortcuts
|
||||||
|
|
||||||
local function dbg(str,...)
|
local function dbg(str,...)
|
||||||
stdnse.print_debug(3,"RMI-DUMPREG:"..str, table.unpack(arg))
|
stdnse.print_debug(3,"RMI-DUMPREG:"..str, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function dbg_err(str, ... )
|
local function dbg_err(str, ... )
|
||||||
stdnse.print_debug("RMI-DUMPREG-ERR:"..str, table.unpack(arg))
|
stdnse.print_debug("RMI-DUMPREG-ERR:"..str, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Function to split a string
|
-- Function to split a string
|
||||||
|
|||||||
Reference in New Issue
Block a user