Home page logo

nmap-dev logo Nmap Development mailing list archives

Variable number of arguments functions - arg not declared
From: Aleksandar Nikolic <nikolic.alek () gmail com>
Date: Mon, 28 May 2012 18:49:23 +0200

Hi all,

I've merged the changes from trunk to my exp branch
to change the scripts I'm working on to suit new lua updates.

I've had a problem with variable number of arguments functions
in rmi.lua library.

As far as I can tell, "arg" variable is deprecated in new version.

For example:

local function dbg(str,...)
        stdnse.print_debug(3,"RMI:"..str, table.unpack(arg))

Would throw an error saying arg was not declared.
I changed that to:

local function dbg(str,...)
        local arg={...}
        stdnse.print_debug(3,"RMI:"..str, table.unpack(arg))

Am I doing something wrong?
I'm bringing this to your attention as it might not be the only place
arg is used.

Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]