Monthly Archives: July 2005

Qualys perl module for QualysGuard

For those who are in the corporate world and use the Qualys (QualysGuard) vulnerability scanner, and wish to write your own applications using their API – I have created a simple connection wrapper to their API. I have uploaded this initial version to CPAN found here:


Nmap-Parser-1.01 Released (finally)

After much rewriting and reworking – I am finally proud to announce that 1.01 is released. Why not 1.00? Well, I did not like my CPAN file just having a 1 by its name. Also it did pass 7 of the CPAN testers, so it should be good to go.

Please read the documentation carefully because there have been MAJOR changes. (If you do not want to install and have all your old script breaking). I know some people are going to get mad because of the major changes, but trust me they had to be done. In most cases, you should like the new framework.

Thanks for your patience and understanding. Happy 4th of July!

Real-Time Scanning – (no better time() like ‘now’)

You can run a nmap scan and have the parser parse the information automagically. The only constraint is that you cannot use ‘-oX’, ‘-oN’, or ‘-oG’ as one of your arguments for nmap command line parameters passed to parsescan().

 use Nmap::Parser;

 my $np = new Nmap::Parser;
 my @hosts = @ARGV; #get hosts from cmd line

 #runs the nmap command with hosts and parses it automagically
 $np->parsescan('/usr/bin/nmap','-sS O -p 1-1023',@hosts);

 for my $host ($np->all_hosts()){
        print $host->hostname."\n";
        #do mor stuff...

Callbacks – (not our $normal *69)

This is probably the easiest way to write a script with using Nmap::Parser, if you don’t need the general scan session information. During the parsing process, the parser will obtain information of every host. The callback function (in this case ‘booyah()’) is called after the parsing of every host (sequentially). When the callback returns, the parser will delete all information of the host it had sent to the callback. This callback function is called for every host that the parser encounters. The callback function must be setup before parsing

 use Nmap::Parser;
 my $np = new Nmap::Parser;

 $np->callback( \&booyah );

    # or use parsescan()

 sub booyah {
    my $host = shift; #Nmap::Parser::Host object, just parsed
    print 'IP: ',$host->addr,"\n";
         # ... do more stuff with $host ...

    #when it returns, host object will be deleted from memory
    #(good for processing VERY LARGE files or scans)

New Nmap-Parser website up and running!

After learning PHP and MySQL and a whole bunch of javascript – I can finally get out of using blogger (not that there is anything wrong with that), but now I wrote my own self-maintaining website! I can now write articles, post updates and manage the website right from sourceforge.

If you ever want to contribute articles (tutorials or anything) to the webiste, go to the articles section and use the link provided to send me your content. I will post it for you so everyone else enjoy (it should be Nmap-Parser or Nmap related).


Anthony G Persaud