Pages

Monday, October 17, 2011

Merging multiple .nessus v2 reports

imageI have recently had the need to merge multiple Nessus reports into single reports and here is the code I used to do it. Take care and if it breaks for you you get to keep both pieces Winking smile, it did however work for me on OSX.

Please note that you need to change the report name to the same value, like this:

sed -i -e s/\<Report\ name=\".*\"\>/\<Report\ name=\"Combined\ report\ name\"\>/g reports/*.xml

mergeReports.pl

#!/usr/bin/env perl

use strict;
use warnings;

use XML::Merge;

if ( $#ARGV < 0 ) {
    print "Merging into " . $ARGV[0] . "\n";
    my $merge_obj = XML::Merge->new( 'filename' => $ARGV[0] );
    foreach my $filename (@ARGV) {
        if ( $filename ne $ARGV[0] ) {
            print "Merging " . $filename . "...";
            $merge_obj->merge( 'filename' => $filename );
            print " Done!\n";
        }
    }

    print "Tyding up.... " . $ARGV[0];
    $merge->tidy();
    print "Done!\n";
} else {
    print "Usage: mergeReports.pl Output.xml inputfiles.xml\n";
}

 


photo_thumb8Michael Boman is a a security consultant with Omegapoint AB Stockholm (Sweden) office.

When he is not breaking in to customers systems and infrastructure he collects and analyzes malware. That is a peculiar hobby but when he said “some people collects stamps, I collect malware” it did make a weird sort of sense.

Michael has spoken at many international security conferences about his discoveries in the security field on various topics from intrusion detection to a large-scale analysis of the worlds HTTPS servers.

2 comments:

  1. Kyäni’s high-impact merchandise tend to be As outlined by cutting-edge science AND ALSO nutrition. your Kyäni Health Triangle™ offers Wild Alaskan Blueberries, Tocotrienols (the almost all potent form of vitamin E), omega-3 fatty acids, AND Nitric Oxide almost all within one easy-to-use system. Kyani

    ReplyDelete
  2. This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. Hypnoterapi

    ReplyDelete