1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-02 11:36:22 +01:00

Only bypass for new style, for backwards compatibility

This commit is contained in:
Ashley Donaldson 2024-10-03 21:56:31 +10:00
parent 0b9ff3fea9
commit 64bd2f16a2

View File

@ -924,6 +924,10 @@ function stdapi_sys_process_execute($req, &$pkt) {
$arg = $arg_tlv['value'];
array_push($real_cmd, $arg);
}
if (is_windows()) {
$options['bypass_shell'] = true;
}
} else {
$cmd_tlv = packet_get_tlv($req, TLV_TYPE_PROCESS_PATH);
$cmd = $cmd_tlv['value'];
@ -945,7 +949,6 @@ function stdapi_sys_process_execute($req, &$pkt) {
if (is_windows()) {
# see http://us2.php.net/manual/en/function.proc-open.php#97012
array_push($pipe_desc, array('pipe','a'));
$options['bypass_shell'] = true;
} else {
array_push($pipe_desc, array('pipe','w'));
}