line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Interface::File; |
6
|
|
|
|
|
|
|
|
7
|
97
|
|
|
97
|
|
135899
|
use v5.12.5; |
|
97
|
|
|
|
|
411
|
|
8
|
97
|
|
|
97
|
|
808
|
use warnings; |
|
97
|
|
|
|
|
433
|
|
|
97
|
|
|
|
|
4072
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.2.3'; # TRIAL VERSION |
11
|
|
|
|
|
|
|
|
12
|
97
|
|
|
97
|
|
6349
|
use Rex; |
|
97
|
|
|
|
|
351
|
|
|
97
|
|
|
|
|
728
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub create { |
15
|
195
|
|
|
193
|
0
|
3034
|
my ( $class, $type ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
193
|
100
|
|
|
|
996
|
unless ($type) { |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#$type = Rex::Commands::task()->get_connection_type; |
20
|
184
|
|
|
|
|
946
|
$type = Rex::get_current_connection()->{conn}->get_connection_type; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#Rex::Commands::task()->get_connection_type; |
23
|
|
|
|
|
|
|
#if(Rex::is_ssh() && ! Rex::is_sudo()) { |
24
|
|
|
|
|
|
|
# $type = "SSH"; |
25
|
|
|
|
|
|
|
#} |
26
|
|
|
|
|
|
|
#elsif(Rex::is_sudo()) { |
27
|
|
|
|
|
|
|
# $type = "Sudo"; |
28
|
|
|
|
|
|
|
#} |
29
|
|
|
|
|
|
|
#else { |
30
|
|
|
|
|
|
|
# $type = "Local"; |
31
|
|
|
|
|
|
|
#} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
193
|
|
|
|
|
1678
|
my $class_name = "Rex::Interface::File::$type"; |
35
|
193
|
|
|
18
|
|
37055
|
eval "use $class_name;"; |
|
18
|
|
|
16
|
|
582
|
|
|
18
|
|
|
13
|
|
213
|
|
|
17
|
|
|
11
|
|
245
|
|
|
15
|
|
|
9
|
|
352
|
|
|
15
|
|
|
9
|
|
207
|
|
|
13
|
|
|
8
|
|
505
|
|
|
11
|
|
|
8
|
|
364
|
|
|
11
|
|
|
8
|
|
180
|
|
|
11
|
|
|
1
|
|
418
|
|
|
11
|
|
|
1
|
|
303
|
|
|
11
|
|
|
1
|
|
142
|
|
|
11
|
|
|
1
|
|
371
|
|
|
9
|
|
|
1
|
|
221
|
|
|
9
|
|
|
1
|
|
187
|
|
|
9
|
|
|
1
|
|
357
|
|
|
9
|
|
|
1
|
|
272
|
|
|
9
|
|
|
1
|
|
123
|
|
|
9
|
|
|
1
|
|
355
|
|
|
8
|
|
|
1
|
|
268
|
|
|
8
|
|
|
1
|
|
121
|
|
|
8
|
|
|
1
|
|
355
|
|
|
8
|
|
|
1
|
|
250
|
|
|
8
|
|
|
1
|
|
194
|
|
|
8
|
|
|
1
|
|
301
|
|
|
8
|
|
|
1
|
|
314
|
|
|
8
|
|
|
1
|
|
144
|
|
|
8
|
|
|
1
|
|
359
|
|
|
1
|
|
|
1
|
|
31
|
|
|
1
|
|
|
1
|
|
58
|
|
|
1
|
|
|
1
|
|
28
|
|
|
1
|
|
|
1
|
|
15
|
|
|
1
|
|
|
1
|
|
33
|
|
|
1
|
|
|
1
|
|
40
|
|
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
1
|
|
54
|
|
|
1
|
|
|
1
|
|
46
|
|
|
1
|
|
|
1
|
|
16
|
|
|
1
|
|
|
1
|
|
47
|
|
|
1
|
|
|
1
|
|
45
|
|
|
1
|
|
|
1
|
|
12
|
|
|
1
|
|
|
1
|
|
50
|
|
|
1
|
|
|
1
|
|
50
|
|
|
1
|
|
|
1
|
|
13
|
|
|
1
|
|
|
1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|
|
1
|
|
|
|
|
43
|
|
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
41
|
|
|
1
|
|
|
|
|
31
|
|
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
36
|
|
|
1
|
|
|
|
|
18
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
22
|
|
|
1
|
|
|
|
|
53
|
|
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
39
|
|
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
33
|
|
|
1
|
|
|
|
|
31
|
|
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
42
|
|
|
1
|
|
|
|
|
25
|
|
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
31
|
|
|
1
|
|
|
|
|
29
|
|
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
38
|
|
|
1
|
|
|
|
|
31
|
|
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
38
|
|
|
1
|
|
|
|
|
75
|
|
|
1
|
|
|
|
|
14
|
|
|
1
|
|
|
|
|
36
|
|
36
|
193
|
50
|
|
|
|
5665
|
if ($@) { die("Error loading file interface $type.\n$@"); } |
|
4
|
|
|
|
|
153
|
|
37
|
|
|
|
|
|
|
|
38
|
193
|
|
|
|
|
2498
|
return $class_name->new; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |