Nmap Development mailing list archives

Re: [NSE][patch] Load script-args from a file


From: Daniel Miller <bonsaiviking () gmail com>
Date: Thu, 29 Dec 2011 09:02:03 -0600

On 12/29/2011 08:07 AM, Patrik Karlsson wrote:


On Sat, Dec 24, 2011 at 6:49 PM, Daniel Miller <bonsaiviking () gmail com <mailto:bonsaiviking () gmail com>> wrote:

    On 12/23/11, Fyodor <fyodor () insecure org
    <mailto:fyodor () insecure org>> wrote:
    >
    > Thanks, but did you remember to attach the patch?  I'm not seeing
    > anything.
    >
    > Cheers,
    > Fyodor
    >
    Oops! Here it is.

    Dan

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


The patch works well for me, although the script-args-file option does not show up in the usage information.
I guess the printusage function has to be patched, in order to show it.

I read through the whole thread again and Toni brought up some interesting stuff with being able to use profiles. Maybe that's something completely different though and I'm not sure how it would work, but I guess it could be nice to have say a debug profile that specifies a bunch of debug arguments to nmap and scripts. Another profile could be os-specific grouping a bunch of typical linux/windows scripts and their proper arguments together. There could also be a default profile that always set's a bunch of options.

//Patrik
--
Patrik Karlsson
http://www.cqure.net
http://twitter.com/nevdull77


Patrik,

It's not quite the same, but if you are using bash, my tab completion script[1] supports "preferences"- values for options that require arguments, like --script-args or -g, can be tab-completed from a file in ~/.nmap. The same mechanism could be hacked to tab-complete common groups of arguments, but it wouldn't be portable.

Dan
[1] https://github.com/bonsaiviking/nmap-completion
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: