line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Session.pm 297 2009-11-16 04:37:07Z jabra $ |
2
|
|
|
|
|
|
|
package Fierce::Parser::Session; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
5
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
6
|
|
|
|
|
|
|
|
7
|
12
|
|
|
12
|
|
77
|
use Object::InsideOut; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
85
|
|
8
|
12
|
|
|
12
|
|
12631
|
use XML::LibXML; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Fierce::Parser::DomainScanDetails; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my @options : Field : Arg(options) : All(options); |
12
|
|
|
|
|
|
|
my @startscan : Field : Arg(startscan) : All(startscan); |
13
|
|
|
|
|
|
|
my @startscanstr : Field : Arg(startscanstr) : All(startscanstr); |
14
|
|
|
|
|
|
|
my @endscan : Field : Arg(endscan) : All(endscan); |
15
|
|
|
|
|
|
|
my @endscanstr : Field : Arg(endscanstr) : All(endscanstr); |
16
|
|
|
|
|
|
|
my @elapsedtime : Field : Arg(elapsedtime) : All(elapsedtime); |
17
|
|
|
|
|
|
|
my @fversion : Field : Arg(fversion) : All(fversion); |
18
|
|
|
|
|
|
|
my @xmlversion : Field : Arg(xmlversion) : All(xmlversion); |
19
|
|
|
|
|
|
|
my @domainscandetails : Field : Arg(domainscandetails) : |
20
|
|
|
|
|
|
|
Get(domainscandetails) : Type(Fierce::Parser::DomainScanDetails); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub parse { |
23
|
|
|
|
|
|
|
my ( $self, $parser, $doc ) = @_; |
24
|
|
|
|
|
|
|
my ( $endscan, $endscanstr, $elapsedtime ); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
foreach my $fiercescan ( $doc->getElementsByTagName('fiercescan') ) { |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
foreach my $end ( $fiercescan->getElementsByTagName('endscan') ) { |
29
|
|
|
|
|
|
|
$endscan = $end->getAttribute('endtime'); |
30
|
|
|
|
|
|
|
$endscanstr = $end->getAttribute('endtimestr'); |
31
|
|
|
|
|
|
|
$elapsedtime = $end->getAttribute('elapsedtime'); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
return Fierce::Parser::Session->new( |
35
|
|
|
|
|
|
|
options => $fiercescan->getAttribute('args'), |
36
|
|
|
|
|
|
|
startscan => $fiercescan->getAttribute('startscan'), |
37
|
|
|
|
|
|
|
startscanstr => $fiercescan->getAttribute('startscanstr'), |
38
|
|
|
|
|
|
|
fversion => $fiercescan->getAttribute('fversion'), |
39
|
|
|
|
|
|
|
xmlversion => $fiercescan->getAttribute('xmlversion'), |
40
|
|
|
|
|
|
|
endscan => $endscan, |
41
|
|
|
|
|
|
|
endscanstr => $endscanstr, |
42
|
|
|
|
|
|
|
elapsedtime => $elapsedtime, |
43
|
|
|
|
|
|
|
domainscandetails => |
44
|
|
|
|
|
|
|
Fierce::Parser::DomainScanDetails->parse( $parser, $doc ), |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
1; |