line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenVAS::OMP::Request; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
635
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
59
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
46
|
|
5
|
2
|
|
|
2
|
|
580
|
use utf8; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
10
|
|
6
|
2
|
|
|
2
|
|
91
|
use feature ':5.10'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
192
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
803
|
use XML::Simple qw( :strict ); |
|
2
|
|
|
|
|
8908
|
|
|
2
|
|
|
|
|
13
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
187
|
use overload q|""| => 'raw', fallback => 1; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
24
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.100'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
1
|
336
|
my ( $class, %args ) = @_; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
2
|
my $command = $args{'command'}; |
19
|
1
|
|
|
|
|
2
|
my $arguments = $args{'arguments'}; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
3
|
my $request = { $command => $arguments }; |
22
|
1
|
|
|
|
|
4
|
my $raw = XMLout( |
23
|
|
|
|
|
|
|
$request, |
24
|
|
|
|
|
|
|
NoEscape => 0, |
25
|
|
|
|
|
|
|
SuppressEmpty => 1, |
26
|
|
|
|
|
|
|
KeepRoot => 1, |
27
|
|
|
|
|
|
|
KeyAttr => $command |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
292
|
chomp($raw); |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
4
|
my $self = { |
33
|
|
|
|
|
|
|
command => $command, |
34
|
|
|
|
|
|
|
arguments => $arguments, |
35
|
|
|
|
|
|
|
raw => $raw, |
36
|
|
|
|
|
|
|
}; |
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
|
|
4
|
return bless $self, $class; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub raw { |
43
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
44
|
0
|
|
|
|
|
0
|
return $self->{raw}; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub command { |
48
|
3
|
|
|
3
|
1
|
12
|
my ($self) = @_; |
49
|
3
|
|
|
|
|
36
|
return $self->{command}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub arguments { |
53
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
54
|
0
|
|
|
|
|
|
return $self->{arguments}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
__END__ |