line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package QualysGuard::Response::AssetSearchReport; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4006
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
128
|
|
4
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
99
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use base qw( QualysGuard::Response ); |
|
1
|
|
|
|
|
87
|
|
|
1
|
|
|
|
|
172
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# ============================================================= |
12
|
|
|
|
|
|
|
# - new |
13
|
|
|
|
|
|
|
# ============================================================= |
14
|
|
|
|
|
|
|
sub new { |
15
|
|
|
|
|
|
|
my ( $class, $xml ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $self = __PACKAGE__->SUPER::new( $xml ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
bless $self, $class; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# -- check for QualysGuard function error |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
if ( $self->exists('/ASSET_SEARCH_REPORT/ERROR') ) { |
24
|
|
|
|
|
|
|
$self->{error_code} = $self->findvalue('/ASSET_SEARCH_REPORT/ERROR/@number'); |
25
|
|
|
|
|
|
|
$self->{error_text} = $self->getNodeText('/ASSET_SEARCH_REPORT/ERROR'); |
26
|
|
|
|
|
|
|
$self->{error_text} =~ s/^\s+(.*)\s+$/$1/m; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# ============================================================= |
35
|
|
|
|
|
|
|
# - get_ip_address_list |
36
|
|
|
|
|
|
|
# ============================================================= |
37
|
|
|
|
|
|
|
sub get_ip_address_list { |
38
|
|
|
|
|
|
|
my $self = shift; |
39
|
|
|
|
|
|
|
my @nodes = $self->findnodes('/ASSET_SEARCH_REPORT/HOST_LIST/HOST/IP'); |
40
|
|
|
|
|
|
|
my @rv = (); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
foreach my $node ( @nodes ) { |
43
|
|
|
|
|
|
|
push( @rv, $node->string_value() ); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
return \@rv; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |