line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Session.pm 142 2009-10-16 19:13:45Z jabra $ |
2
|
|
|
|
|
|
|
package Nikto::Parser::Session; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
5
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
44
|
use Object::InsideOut; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
43
|
|
8
|
7
|
|
|
7
|
|
6276
|
use XML::LibXML; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Nikto::Parser::ScanDetails; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my @options : Field : Arg(options) : All(options); |
12
|
|
|
|
|
|
|
my @version : Field : Arg(version) : All(version); |
13
|
|
|
|
|
|
|
my @nxmlversion : Field : Arg(nxmlversion) : All(nxmlversion); |
14
|
|
|
|
|
|
|
my @scandetails : Field : Arg(scandetails) : Get(scandetails) : |
15
|
|
|
|
|
|
|
Type(Nikto::Parser::ScanDetails); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub parse { |
18
|
|
|
|
|
|
|
my ( $self, $parser, $doc ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
foreach my $niktoscan ( $doc->getElementsByTagName('niktoscan') ) { |
21
|
|
|
|
|
|
|
return Nikto::Parser::Session->new( |
22
|
|
|
|
|
|
|
options => $niktoscan->getAttribute('options'), |
23
|
|
|
|
|
|
|
version => $niktoscan->getAttribute('version'), |
24
|
|
|
|
|
|
|
nxmlversion => $niktoscan->getAttribute('nxmlversion'), |
25
|
|
|
|
|
|
|
scandetails => |
26
|
|
|
|
|
|
|
Nikto::Parser::ScanDetails->parse( $parser, $doc ), |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
1; |