Nmap Development mailing list archives

Re: Support for calling scripts without the full argument name


From: Paulino Calderon <paulino () calderonpale com>
Date: Wed, 27 Jul 2011 13:51:54 -0700

On 07/26/2011 11:09 PM, Kris Katterjohn wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/26/2011 11:46 PM, Paulino Calderon wrote:
Hi,

I've added support for setting arguments without the full script name. Ex.

Before:
nmap --script http-trace http-trace.path=/path/<host>

Now:
nmap --script http-trace path=/path/<host>

Wow.  I know I've been way too busy to play with Nmap recently, but why did
this support ever go away?  Or is this only to just now add it for all scripts?

Removing support for this (or just keeping it out) was brought up on several
occasions by multiple developers in the past and I had to vehemently fight for
it to stay[1].  I've had a little loop I use in some of my scripts (which was
copied to some others) which has always provided this same functionality for
them (obviously before this standard script arg function came along).

Cheers,
Kris Katterjohn

[1] http://seclists.org/nmap-dev/2010/q2/110

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOL6uwAAoJEEQxgFs5kUfui3AP/RTN2u8nN/pKesEHgr/pIKS6
Xm2zNLveP9PDahCn0aFWC1K81++TNYXM2iWJgHx32ex3DuMnFOu9cIRVdtg0zAqZ
vPS2ePRcN1GCONvL2RZBeMrjA7RaF7sGQvqfrha8EQY49UXOrDavC69tRhi+AT1s
sxUApJuqusAgRc+KVK4XufHPsI9+NfO0kBA32faxSSQSmqXHm1ZRv+Wwj1cTL2zs
fpdoCTmQEWaMTwqOnwMDU52SOCt3kgnvagi8GI00pboApvqAWFh8BjiJWmJ5aVFX
ZIB4nByx5HwDcEdtaHvh7RszmfIa+cmamDzhoxFJJubwLyxKQI99Di5y6LCbt+FU
puFKzg5FslTYhSjGckmND36wTal9Dg4ylWAmXy/y9q1gN/DmI+WmNIPoyLE8AqkU
DlB2wpCWJVd/378WEB/mTg0Fdl6KcDJSsRM8TqOJIwaZ6E0MASJ8NQKV/Jhzuvyb
gDlSAP9wh42TfJNFj03LunYBbarkrVXttNtxvPl0rp9QMwhA0BB7ah+DWhgUc3NL
dl8aZYZf2mtfT/qcXuaP00gTV5NChygFzkqHxPdr60n7BQ1LWocAXEjrRP/TIDOB
5/saygFAhHgSqduWxM9xGiCixSWmYIG0vMqooP3ecMpd2NjpiiiOhjIY+oG2nKHF
7LWOp9xTCh/5zkNBbdfx
=SDyJ
-----END PGP SIGNATURE-----
It didn't go away, it just got incorporated to the standard call:

local arg = stdnse.get_script_args(SCRIPT_NAME..".argument")

Now developers don't need to do workarounds (like you did in your scripts) to support this "alias".

Cheers.

--
Paulino Calderón Pale
Web: http://calderonpale.com
Twitter: http://www.twitter.com/paulinocaIderon

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: