Nmap Development mailing list archives

Re: A formal language for NMAP?


From: Lorenzo Rossi <tacchino801 () libero it>
Date: Tue, 17 Feb 2004 22:07:19 +0100

Hi Max,

thanks for your message,

Il sab, 2004-02-14 alle 22:21, Max ha scritto:
Hi Lorenzo,

Nmap has an XML output option ... -oX.  Use that with
-v -v -v when you do your scan and you will see all 
of the output of the various probes etc very nicely in 
XML.

I'm sorry I have wrote without check carefully the output option of
nmap. This option semplify very much the building of a framework in wich
I would like to use various tools to performs pen-test activity.

Or are you asking about having nmap actually just write out
what it would do were you to actually run it in XML but not
actually perform the scan .. is that the scripting language
you are talking about?  If so, what would the advantage of
doing that be over just storing sets of nmap options for
use later?  e.g. in perl, you could do something like:

my %OPTIONS = qw(
    verbose   -v
    syn_scan  -sS
    fin_scan  -sT
    fast_scan -F
);

my $cmd = make_cmd(qw(verbose verbose verbose fast_scan syn_scan));

sub make_cmd {
    my @options = @_;

    my $cmd = "nmap ";

    local($_);

    $cmd = join(' ', map { $OPTIONS{$_}; } @options);

    return $cmd;
}

What would the advantage be of having nmap produce this?

I could use a use for nmap taking in XML-formatting options ..

<nmap-options>
    <verbose/>
    <verbose/>
    <verbose/>
    <ports>
        <port range="true">1-53</port>
        <port>80</port>
    </port>
</nmap-options>

As that would make building tools that build up nmap command
lines easier to write and maintain .. is that more what you
are referring to? 
Yes right, this can be a good solution

 Then again, the above XML creation could 
be implemented by a high-level tool and then filtered to
produce real nmap options without too much difficulty.

I agree

Regards,
Max

---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help () insecure org . List archive: http://seclists.org

Thanks
Lorenzo


---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help () insecure org . List archive: http://seclists.org



Current thread: