Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Script Arguments and IDs
From: Kris Katterjohn <katterjohn () gmail com>
Date: Sun, 01 Jun 2008 19:41:54 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey everyone,

The NSE documentation says this on script arguments[1]:

"As a general rule the subtables used to override options for scripts should
be named as the script's id, since otherwise scripts can't know where to
search for their arguments."

The example:

"{user="foo",pass="bar",anonFTP={pass="nobody () foobar com"}}"


However, many scripts have IDs which don't allow for this "scoping".  This can
be caused by a space (e.g. "SSH Protocol Version 1") or hyphen (e.g.
"zone-transfer") in the script id.

And the example above even uses the filename (minus .nse) for the subtable
name rather than the script's id ("Anonymous FTP") -- or was it originally
"anonFTP" but changed?

So instead of using the script id, the subtable name checked for may need to
be hardcoded in (presumably using the filename).  But even then it can be
messed up (e.g. "SSLv2-support").

I think "nmap.registry.args[id]" is cleaner than some hardcoded name.

So how should this work?  Should we just specify what to name the subtable in
the individual scripts rather than assuming the ID, or should IDs just be
valid if args are used?

Also: should IDs and filenames be closely related, or should it not matter?

Thanks,
Kris Katterjohn

[1] http://nmap.org/book/nse-usage.html#nse-args

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

iQIVAwUBSENBz/9K37xXYl36AQIBYg//V2HEHRvCLQ7PHvS4TM+2V/ha0Lo+CjFz
6aoBnG6BeYDnq49sYXS/WvW9NGvJaiORBbX26Tb98KZzxAKzrhaFgAx5u8T7YKM6
y1iiXZu4chVpYvsGaGPoX8yb4MqNSDBHIPEs0jtpcTWNNeab8113HRwgp4tWYFgU
YNbMZmAQQdTTN/d/UoXJq6KZ+WWpflJIALB23JzbLm+LQgxQsba19TQ4vU+z+mKc
3RSih4WlhjqrJPO7kj/DYud5v1ofTeJ0Qz/iaJN/vi+StedTruRw+rT0+MvaAqTL
UwZBK6oZlFMBnGM3QYFSn22rpA5KoWY9pTVOuS38oN5PPY1SFHClrbRLOqJi14ka
EXO3nt2HOX8+Ya7jROx/kbcO5HtMR+UNlrEpuyA3hBLh8TM47Oqkm3XpXoGk0KeK
xIYLSS+Wd9B/qxEuErMcM6I6aTqj7R4tEjBaURT9bF+Ssy5lIOW+or13QRZpuT9T
VkHl8MaO0+fGjjtRYFzM41ABoBK09t3jitvuOLxcGPbqjoVRWYgt+HE1Yaedr3o/
HQtXCsrWrNbCQOl76I5+dg5/wo6cw4nEMCAtkAbZ50rwS2AsmvwV7o4Ia+CtRbv0
kCh7P2NG5BphqoJifBSvJfzeweFGz84zqsGoMK2h/xyMUzOAngLVGUmC/Pqx905c
qpIFrbuZQPQ=
=FijN
-----END PGP SIGNATURE-----

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


  By Date           By Thread  

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