line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Session.pm 18 2008-05-05 23:55:18Z jabra $ |
2
|
|
|
|
|
|
|
package MetasploitExpress::Parser::Session; |
3
|
|
|
|
|
|
|
{ |
4
|
2
|
|
|
2
|
|
13
|
use Object::InsideOut; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
5
|
2
|
|
|
2
|
|
1461
|
use XML::LibXML; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use MetasploitExpress::Parser::ScanDetails; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my @time : Field : Arg('time') : All('time'); |
9
|
|
|
|
|
|
|
my @user : Field : Arg(user) : All(user); |
10
|
|
|
|
|
|
|
my @project : Field : Arg(project) : All(project); |
11
|
|
|
|
|
|
|
my @scandetails : Field : Arg(scandetails) : Get(scandetails) : |
12
|
|
|
|
|
|
|
Type(MetasploitExpress::Parser::ScanDetails); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub parse { |
15
|
|
|
|
|
|
|
my ( $self, $parser, $doc ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
foreach my $msf ( $doc->getElementsByTagName('generated') ) { |
18
|
|
|
|
|
|
|
return MetasploitExpress::Parser::Session->new( |
19
|
|
|
|
|
|
|
'time' => $msf->getAttribute('time'), |
20
|
|
|
|
|
|
|
user => $msf->getAttribute('user'), |
21
|
|
|
|
|
|
|
project => $msf->getAttribute('project'), |
22
|
|
|
|
|
|
|
scandetails => MetasploitExpress::Parser::ScanDetails->parse( |
23
|
|
|
|
|
|
|
$parser, $doc |
24
|
|
|
|
|
|
|
), |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
1; |