Recently, I released several new security modules on CPAN. One of the modules is Nikto::Parser. It provides a module for extracting information from nikto so that users can build powerful web application testing tools. Nikto::Parser can be found here.
Here is an example of performing a nikto scan and then parsing the results with Nikto::Parser:
my $npx = new Nikto::Parser;
my @ips;
push(@ips,"127.0.0.1");
my $parser = $npx->parse_scan("/pentest/svn/nikto/", "", @ips);
foreach my $h ( $parser->get_all_hosts() ) {
print "ip: " . $h->ip . "\n";
foreach my $p ( $h->get_all_ports() ) {
print "port: " . $p->port . "\n";
print "banner: " . $p->banner . "\n";
foreach my $i ( $p->get_all_items ) {
print "Description:\n" . $i->description . "\n";
}
}
print "---\n";
}