mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-24 18:16:24 +01:00
Fix #512, fix python cmd_exec argument list during PROCESS_EXECUTE_FLAG_SUBSHELL
This commit is contained in:
parent
d08b1b31e8
commit
a59fd61520
@ -1163,7 +1163,9 @@ def stdapi_sys_process_execute(request, response):
|
|||||||
if len(cmd) == 0:
|
if len(cmd) == 0:
|
||||||
return ERROR_FAILURE, response
|
return ERROR_FAILURE, response
|
||||||
if os.path.isfile('/bin/sh') and (flags & PROCESS_EXECUTE_FLAG_SUBSHELL):
|
if os.path.isfile('/bin/sh') and (flags & PROCESS_EXECUTE_FLAG_SUBSHELL):
|
||||||
args = ['/bin/sh', '-c', cmd, raw_args]
|
if raw_args:
|
||||||
|
cmd = cmd + ' ' + raw_args
|
||||||
|
args = ['/bin/sh', '-c', cmd]
|
||||||
else:
|
else:
|
||||||
args = [cmd]
|
args = [cmd]
|
||||||
args.extend(shlex.split(raw_args))
|
args.extend(shlex.split(raw_args))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user