Nmap Development mailing list archives
Re: [NSE] Patch to get_args for deprecation
From: David Fifield <david () bamsoftware com>
Date: Fri, 24 Sep 2010 16:41:30 -0700
On Thu, Sep 23, 2010 at 10:35:52PM -0500, Ron wrote:
On Thu, 23 Sep 2010 20:27:33 -0700 David Fifield <david () bamsoftware com> wrote:This would only apply to scripts, not libraries. (I'm not sure if that's technically easy to accomplish.) If a script wants only a fully qualified name for whatever reason, get_script_args could be smart enough to look for a dot and not add an extra qualification in that case.I'm not quite sure I understand what you're saying, but I've also been at my computer for the better part of the last 15 hours working mostly on SMB stuff. Can you phrase it differently? :) I think it makes sense for libraries to have qualified names, too, which you may have been disagreeing with. 'smb.user' makes a lot more sense than just 'user' and way more sense than, say, 'smb-psexec.user'.
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
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE] Patch to get_args for deprecation Ron (Sep 23)
- Re: [NSE] Patch to get_args for deprecation Kris Katterjohn (Sep 23)
- Re: [NSE] Patch to get_args for deprecation David Fifield (Sep 23)
- Re: [NSE] Patch to get_args for deprecation Ron (Sep 23)
- Re: [NSE] Patch to get_args for deprecation David Fifield (Sep 23)
- Re: [NSE] Patch to get_args for deprecation Ron (Sep 24)
- Re: [NSE] Patch to get_args for deprecation David Fifield (Sep 24)
- Re: [NSE] Patch to get_args for deprecation Ron (Sep 25)
- Re: [NSE] Patch to get_args for deprecation David Fifield (Sep 23)
- Re: [NSE] Patch to get_args for deprecation Kris Katterjohn (Sep 23)
- Re: [NSE] Patch to get_args for deprecation Fyodor (Sep 24)
- Re: [NSE] Patch to get_args for deprecation Kris Katterjohn (Sep 23)
