1
0
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:
batrick
2012-06-06 22:08:01 +00:00
parent 721ac80024
commit ceaa65a0f4
8 changed files with 13 additions and 13 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 = {}

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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