line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Armadito::Agent::Antivirus::Armadito; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2934547
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
44
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
58
|
|
5
|
1
|
|
|
1
|
|
3
|
use base 'Armadito::Agent::Antivirus'; |
|
1
|
|
|
|
|
29
|
|
|
1
|
|
|
|
|
396
|
|
6
|
1
|
|
|
1
|
|
392
|
use Armadito::Agent::HTTP::Client::ArmaditoAV; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
0
|
|
|
0
|
1
|
|
my ( $class, %params ) = @_; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(%params); |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
$self->{name} = "Armadito"; |
14
|
0
|
|
|
|
|
|
$self->{version} = $self->getVersion(); |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub getJobj { |
20
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
return { |
23
|
|
|
|
|
|
|
name => $self->{name}, |
24
|
|
|
|
|
|
|
os_info => $self->{os_info}, |
25
|
|
|
|
|
|
|
version => $self->{version} |
26
|
0
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub getVersion { |
30
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
$self->{av_client} = Armadito::Agent::HTTP::Client::ArmaditoAV->new( taskobj => $self ); |
33
|
0
|
|
|
|
|
|
my $jobj = $self->{av_client}->getAntivirusVersion(); |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $jobj->{"antivirus-version"}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Armadito::Agent::Antivirus - Armadito Agent Antivirus base class. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This is a base class for all stuff specific to an Antivirus. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 FUNCTIONS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 new ( $self, %params ) |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Instanciate Armadito module. Set task's default logger. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head2 getJobj ( $self ) |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Return unblessed object for json ecnapsulation. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 getVersion ( $self ) |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Return Antivirus Version by using RESTful API /version. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|