Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: A formal language for NMAP?
From: "Max" <nmap () webwizarddesign com>
Date: Sat, 14 Feb 2004 16:21:06 -0500

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.

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?  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.

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



  By Date           By Thread  

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