| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# $Id: Parser.pm 71 2008-08-31 05:58:17Z jabra $ |
|
2
|
|
|
|
|
|
|
package Dirbuster::Parser; |
|
3
|
|
|
|
|
|
|
{ |
|
4
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
|
5
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
61875
|
use Object::InsideOut; |
|
|
2
|
|
|
|
|
180012
|
|
|
|
2
|
|
|
|
|
15
|
|
|
8
|
2
|
|
|
2
|
|
1736
|
use Dirbuster::Parser::Session; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my @session : Field : Arg(session) : Get(session) : Type(Dirbuster::Parser::Session); |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# parse_file |
|
12
|
|
|
|
|
|
|
# |
|
13
|
|
|
|
|
|
|
# Input: |
|
14
|
|
|
|
|
|
|
# argument - self obj - |
|
15
|
|
|
|
|
|
|
# argument - xml scalar |
|
16
|
|
|
|
|
|
|
# |
|
17
|
|
|
|
|
|
|
# Ouptut: |
|
18
|
|
|
|
|
|
|
# |
|
19
|
|
|
|
|
|
|
sub parse_file { |
|
20
|
|
|
|
|
|
|
my ( $self, $file ) = @_; |
|
21
|
|
|
|
|
|
|
my $parser = XML::LibXML->new(); |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $doc = $parser->parse_file($file); |
|
24
|
|
|
|
|
|
|
return Dirbuster::Parser->new( |
|
25
|
|
|
|
|
|
|
session => Dirbuster::Parser::Session->parse( $parser, $doc ) ); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub get_session { |
|
29
|
|
|
|
|
|
|
my ($self) = @_; |
|
30
|
|
|
|
|
|
|
return $self->session; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get_all_results { |
|
34
|
|
|
|
|
|
|
my ($self) = @_; |
|
35
|
|
|
|
|
|
|
my @all_results = $self->session->scandetails->all_results(); |
|
36
|
|
|
|
|
|
|
return @all_results; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
1; |
|
40
|
|
|
|
|
|
|
|