mirror of
https://github.com/rapid7/metasploit-payloads
synced 2024-11-26 17:41:08 +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:
|
||||
return ERROR_FAILURE, response
|
||||
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:
|
||||
args = [cmd]
|
||||
args.extend(shlex.split(raw_args))
|
||||
|
Loading…
Reference in New Issue
Block a user