line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenVAS::OMP::Request; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
735
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
60
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
62
|
|
5
|
2
|
|
|
2
|
|
711
|
use utf8; |
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
9
|
|
6
|
2
|
|
|
2
|
|
72
|
use feature ':5.10'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
192
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
579
|
use XML::Hash::XS; |
|
2
|
|
|
|
|
1121
|
|
|
2
|
|
|
|
|
150
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
15
|
use overload q|""| => 'raw', fallback => 1; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
12
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.200'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
1
|
361
|
my ( $class, %args ) = @_; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
3
|
my $command = $args{'command'}; |
19
|
1
|
|
|
|
|
2
|
my $arguments = $args{'arguments'}; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
3
|
my $request = { $command => $arguments }; |
22
|
1
|
|
|
|
|
2
|
my $raw = hash2xml( \%{$arguments}, root => $command, use_attr => 1, xml_decl => 0 ); |
|
1
|
|
|
|
|
27
|
|
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
3
|
chomp($raw); |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
4
|
my $self = { |
27
|
|
|
|
|
|
|
command => $command, |
28
|
|
|
|
|
|
|
arguments => $arguments, |
29
|
|
|
|
|
|
|
raw => $raw, |
30
|
|
|
|
|
|
|
}; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
4
|
return bless $self, $class; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub raw { |
37
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
38
|
0
|
|
|
|
|
0
|
return $self->{raw}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub command { |
42
|
3
|
|
|
3
|
1
|
9
|
my ($self) = @_; |
43
|
3
|
|
|
|
|
38
|
return $self->{command}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub arguments { |
47
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
48
|
0
|
|
|
|
|
|
return $self->{arguments}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
__END__ |