line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Interface::Connection; |
6
|
|
|
|
|
|
|
|
7
|
135
|
|
|
135
|
|
1620
|
use v5.12.5; |
|
135
|
|
|
|
|
533
|
|
8
|
135
|
|
|
108
|
|
974
|
use warnings; |
|
108
|
|
|
|
|
332
|
|
|
108
|
|
|
|
|
16255
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.2'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub create { |
13
|
112
|
|
|
106
|
0
|
934
|
my ( $class, $type ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
106
|
50
|
|
|
|
597
|
unless ($type) { |
16
|
0
|
|
|
|
|
0
|
$type = Rex::Config->get_connection_type(); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
106
|
|
|
|
|
523
|
my $class_name = "Rex::Interface::Connection::$type"; |
20
|
106
|
|
|
67
|
|
11353
|
eval "use $class_name;"; |
|
67
|
|
|
|
|
1218
|
|
|
67
|
|
|
|
|
280
|
|
|
67
|
|
|
|
|
821
|
|
21
|
106
|
50
|
|
|
|
2368
|
if ($@) { die("Error loading connection interface $type.\n$@"); } |
|
0
|
|
|
|
|
0
|
|
22
|
|
|
|
|
|
|
|
23
|
106
|
|
|
|
|
761
|
return $class_name->new; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |