Nmap Development mailing list archives

Re: [NSE] Patch to get_args for deprecation


From: Ron <ron () skullsecurity net>
Date: Sat, 25 Sep 2010 14:17:12 -0500

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

On Fri, 24 Sep 2010 16:41:30 -0700 David Fifield <david () bamsoftware com> wrote:
I mean that the automatic qualification would only be done for
scripts. If a script says get_script_args("user") then it would
accept either "user" or "script-name.user". Libraries would have to
do their own qualification, so a library would say
get_script_args("smb.user") and it would only recognize the one
argument "smb.user".

get_script_args would look for a dot and not add the full
qualification if the dot is present. get_script_args("user") would
match both "script-name.user" and "user", but
get_script_args("script-name.user") would match only
"script-name.user". (Not "script-name.script-name.user".) Libraries
would specify their arguments this way to make sure they use exactly
the qualification they expect.

David Fifield
Ah, I get it! 

That works for me. I'm assuming we'll end up having some convention (like "smb.") for groups of libraries, but it makes 
sense to do that manually. People writing libraries should hopefully be more careful than people writing scripts. 

Ron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkyeSrgACgkQ2t2zxlt4g/QgmQCgqTIa9nZzaNavif6IvkYmkG1G
siQAn1cKITaJC7+OT/hHvehsVmU2lUMe
=cnj1
-----END PGP SIGNATURE-----
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: