mirror of
https://github.com/rapid7/metasploit-payloads
synced 2024-12-27 08:33:43 +01:00
catch termios exceptions
This commit is contained in:
parent
0f2fa4a0c2
commit
9db18dc8a3
@ -987,9 +987,12 @@ def stdapi_sys_process_execute(request, response):
|
||||
if has_pty:
|
||||
master, slave = pty.openpty()
|
||||
if has_termios:
|
||||
settings = termios.tcgetattr(master)
|
||||
settings[3] = settings[3] & ~termios.ECHO
|
||||
termios.tcsetattr(master, termios.TCSADRAIN, settings)
|
||||
try:
|
||||
settings = termios.tcgetattr(master)
|
||||
settings[3] = settings[3] & ~termios.ECHO
|
||||
termios.tcsetattr(master, termios.TCSADRAIN, settings)
|
||||
except:
|
||||
pass
|
||||
proc_h = STDProcess(args, stdin=slave, stdout=slave, stderr=slave, bufsize=0)
|
||||
proc_h.stdin = os.fdopen(master, 'wb')
|
||||
proc_h.stdout = os.fdopen(master, 'rb')
|
||||
|
Loading…
Reference in New Issue
Block a user