mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-18 15:14:10 +01:00
Only bypass for new style, for backwards compatibility
This commit is contained in:
parent
0b9ff3fea9
commit
64bd2f16a2
@ -924,6 +924,10 @@ function stdapi_sys_process_execute($req, &$pkt) {
|
|||||||
$arg = $arg_tlv['value'];
|
$arg = $arg_tlv['value'];
|
||||||
array_push($real_cmd, $arg);
|
array_push($real_cmd, $arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_windows()) {
|
||||||
|
$options['bypass_shell'] = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$cmd_tlv = packet_get_tlv($req, TLV_TYPE_PROCESS_PATH);
|
$cmd_tlv = packet_get_tlv($req, TLV_TYPE_PROCESS_PATH);
|
||||||
$cmd = $cmd_tlv['value'];
|
$cmd = $cmd_tlv['value'];
|
||||||
@ -945,7 +949,6 @@ function stdapi_sys_process_execute($req, &$pkt) {
|
|||||||
if (is_windows()) {
|
if (is_windows()) {
|
||||||
# see http://us2.php.net/manual/en/function.proc-open.php#97012
|
# see http://us2.php.net/manual/en/function.proc-open.php#97012
|
||||||
array_push($pipe_desc, array('pipe','a'));
|
array_push($pipe_desc, array('pipe','a'));
|
||||||
$options['bypass_shell'] = true;
|
|
||||||
} else {
|
} else {
|
||||||
array_push($pipe_desc, array('pipe','w'));
|
array_push($pipe_desc, array('pipe','w'));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user