mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-20 20:37:27 +01:00
Land #275, fix python stdapi_sys_process_execute on Solaris 11.1
This commit is contained in:
commit
ad3a821ffe
@ -1,4 +1,3 @@
|
||||
# vim: tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
|
||||
import fnmatch
|
||||
import getpass
|
||||
import os
|
||||
@ -987,9 +986,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')
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
# vim: tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
|
||||
import binascii
|
||||
import code
|
||||
import os
|
||||
|
Loading…
Reference in New Issue
Block a user