line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Interface::Connection; |
6
|
|
|
|
|
|
|
|
7
|
135
|
|
|
135
|
|
1685
|
use v5.12.5; |
|
135
|
|
|
|
|
447
|
|
8
|
135
|
|
|
108
|
|
905
|
use warnings; |
|
108
|
|
|
|
|
351
|
|
|
108
|
|
|
|
|
16292
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.3'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub create { |
13
|
112
|
|
|
106
|
0
|
931
|
my ( $class, $type ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
106
|
50
|
|
|
|
636
|
unless ($type) { |
16
|
0
|
|
|
|
|
0
|
$type = Rex::Config->get_connection_type(); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
106
|
|
|
|
|
516
|
my $class_name = "Rex::Interface::Connection::$type"; |
20
|
106
|
|
|
67
|
|
10692
|
eval "use $class_name;"; |
|
67
|
|
|
|
|
1212
|
|
|
67
|
|
|
|
|
395
|
|
|
67
|
|
|
|
|
745
|
|
21
|
106
|
50
|
|
|
|
2389
|
if ($@) { die("Error loading connection interface $type.\n$@"); } |
|
0
|
|
|
|
|
0
|
|
22
|
|
|
|
|
|
|
|
23
|
106
|
|
|
|
|
630
|
return $class_name->new; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |