1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-20 20:37:27 +01:00

Land #510, honour the pty flag

This commit is contained in:
Tim W 2021-11-29 04:48:00 +00:00
commit 0e2b68a9fe
No known key found for this signature in database
GPG Key ID: 217FBA50ABBAABEF

View File

@ -662,6 +662,7 @@ PROCESS_EXECUTE_FLAG_CHANNELIZED = (1 << 1)
PROCESS_EXECUTE_FLAG_SUSPENDED = (1 << 2)
PROCESS_EXECUTE_FLAG_USE_THREAD_TOKEN = (1 << 3)
PROCESS_EXECUTE_FLAG_SUBSHELL = (1 << 6)
PROCESS_EXECUTE_FLAG_PTY = (1 << 7)
PROCESS_ARCH_UNKNOWN = 0
PROCESS_ARCH_X86 = 1
@ -1166,7 +1167,7 @@ def stdapi_sys_process_execute(request, response):
args.extend(shlex.split(raw_args))
if (flags & PROCESS_EXECUTE_FLAG_CHANNELIZED):
if has_pty:
if has_pty and (flags & PROCESS_EXECUTE_FLAG_PTY):
master, slave = pty.openpty()
if has_termios:
try: