mirror of https://github.com/n1nj4sec/pupy.git
interactive shell bugfix : pupy server stdin was closed at exit because of the python gc
This commit is contained in:
parent
5d92fb5368
commit
7e5e036a09
|
@ -49,10 +49,9 @@ class InteractiveShell(PupyModule):
|
|||
ps.start_read_loop(print_callback, is_closed.set)
|
||||
try:
|
||||
fd=sys.stdin.fileno()
|
||||
f=os.fdopen(fd,'r')
|
||||
old_settings = termios.tcgetattr(fd)
|
||||
try:
|
||||
tty.setraw(fd)
|
||||
tty.setraw(sys.stdin.fileno())
|
||||
input_buf=b""
|
||||
while True:
|
||||
r, w, x = select.select([sys.stdin], [], [], 0)
|
||||
|
|
|
@ -14,5 +14,7 @@ pyexec = pyexec
|
|||
exec = shell_exec
|
||||
ps = ps
|
||||
migrate = migrate
|
||||
shell=interactive_shell
|
||||
kill = process_kill
|
||||
killme = pyexec -c 'import os;os.kill(os.getpid(),9)'
|
||||
#tasklist = shell_exec 'tasklist /v'
|
||||
|
|
Loading…
Reference in New Issue