About

SourceForge.net This module implements a interface to the information contained in an nmap scan. It is implemented by parsing the xml scan data that is generated by nmap. This will enable anyone who utilizes nmap to quickly create fast and robust security scripts that utilize the powerful port scanning abilities of nmap.

Advertisements

4 thoughts on “About

  1. Kathy Simmons

    Question about nmap:parser. I’m trying to get the ip address of the down hosts from an xml file – is this possible? Here’s a quick segment of my code, but I get nothing:

    $np->parsefile(“$ARGV[0])”);
    @down = $np->all_hosts(‘down’);
    foreach $h (@down) {
    $addr = $h->addr();
    print “addr is $addr\n”;
    }

    I’ve also tried to get_ips(‘down’) and it returns nothing. What am I doing wrong here?

    Reply
  2. chris

    do you plan on incorporating the ability to pull in the data retrieved by various NSE scripts? for example, when doing a service check for MySQL or MS SQL and then running a NSE script to pull in extra info about the server and service.

    i’ve done some testing, but don’t see that this data is being collected or even seen by the parser.

    thanks,
    chris

    Reply
  3. arockiam

    Hello apersaud@gmail.com
    Good morning, I am not sure, whether you are the right contact for this module? I am fan of Perl and using it for automating my daily tasks.
    Could you please help, what is the issue, I am facing? I am getting error as below while executing this simple code.

    Eorror
    read error at /usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/XML/Parser/Expat.pm line 469.
    at /usr/lib/perl5/site_perl/5.10.0/Nmap/Parser.pm line 78

    Code
    #!/usr/bin/perl
    # Batch mode of Nmap::Parser
    use Nmap::Parser;

    my $nmapexec=”/opt/bin/nmap”;
    my $nmapargs=”-p 22″;
    my $ost=”200.140.11.2″;
    $np = new Nmap::Parser;
    $np->parsescan($nmapexec, $nmapargs, $ost);

    for my $hosts ($np->all_hosts()){
    print $host->hostname();
    }

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s