Dirbuster::Parser - Parse Dirbuster scan data with Perl
This document describes Dirbuster::Parser version .02
my $dpx = new Dirbuster::Parser; my $parser = $dpx->parse_file('test1.xml'); #a Dirbuster::Parser Object my @results = $parser->get_all_results(); #an Array of Dirbuster::Parser::Result Objects foreach my $h ( grep($_->type eq 'Dir', $parser->get_all_results()) ) { print "Type: " . $h->type . "\n"; print "Path: " . $h->path . "\n"; print "Response Code: " . $h->response_code . "\n"; }
For a full listing of methods see the documentation corresponding to each object.
Dirbuster::Parser -- Core parser | +--Dirbuster::Parser::Session -- Dirbuster scan session information | +--Dirbuster::Parser::Target -- General target information | | | |--Dirbuster::Parser::Target::Result -- Result information | | |
The main idea behind the core modules is, you will first parse the scan data then extract the information. Therefore, you should run parse_file then the you can use any of the subroutines of the objects.
Parse a Dirbuster XML file. This subroutine returns a Dirbuster::Parser object containing the information from the XML.
Obtain the Dirbuster::Parser::Session object which contains the session scan information.
Obtain an Array of Dirbuster::Parser::Target::Result objects which contain file and directory information.
This object contains the information for a result
Returns a string which contains the type (File or Dir)
Returns the response code from the request.
Returns the path.
Here is an example of parsing an XML file using Dirbuster::Parser:
my $dpx = new Dirbuster::Parser; my $parser = $dpx->parse_file('test1.xml'); print "Directories:\n"; foreach my $h ( grep($_->type eq "Dir", $parser->get_all_results()) ) { print "Type: " . $h->type . "\n"; print "Path: " . $h->path . "\n"; print "Response Code: " . $h->response_code . "\n"; } print "Files:\n"; foreach my $h ( grep($_->type eq "File", $parser->get_all_results()) ) { print "Type: " . $h->type . "\n"; print "Path: " . $h->path . "\n"; print "Response Code: " . $h->response_code . "\n"; }
Dirbuster, XML::LibXML and Object::InsideOut
Joshua "Jabra" Abraham, <jabra AT spl0it DOT org>
Copyright 2009 Joshua D. Abraham. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Dirbuster::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dirbuster::Parser
CPAN shell
perl -MCPAN -e shell install Dirbuster::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.