1
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:
Tim W 2018-03-10 02:47:24 +08:00
commit ad3a821ffe
No known key found for this signature in database
GPG Key ID: 44745FB90E70D34F
2 changed files with 6 additions and 5 deletions

View File

@ -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')

View File

@ -1,5 +1,4 @@
#!/usr/bin/python
# vim: tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
import binascii
import code
import os