You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I call process.interactive() and the process terminates, I get a message about an EOFError but the interactive prompt still stays open. How can I break from this prompt when an error is received?
The text was updated successfully, but these errors were encountered:
$ ./test-interactive.py
[+] Starting local process '/bin/ls': pid 2131696
p.proc.stdin.closed: False
p.proc.stdout.closed: False
p.connected('send'): True
p.connected('recv') True
p.can_recv() True
[*] Switching to interactive mode
[*] Process '/bin/ls' stopped with exit code 0 (pid 2131696)
a.out aslr.c test-interactive.py test.py
[*] Got EOF while reading in interactive
$
[*] Interrupted
p.proc.stdin.closed: False
p.proc.stdout.closed: True
p.connected('send'): True
p.connected('recv') False
p.can_recv() False
p.proc.stdin.closed: False
p.proc.stdout.closed: True
p.connected('send'): True
p.connected('recv') False
p.can_recv() False
Traceback (most recent call last):
File "/home/gsgx/.local/lib/python3.10/site-packages/pwnlib/tubes/process.py", line 746, in close
fd.close()
BrokenPipeError: [Errno 32] Broken pipe
So the EOFError happened in the middle of interactive() on the recv side, so I can't check for this before calling it. Essentially, I'd like interactive() to end if the recv end disconnects, without waiting for the send end to disconnect.
If I call
process.interactive()
and the process terminates, I get a message about an EOFError but the interactive prompt still stays open. How can I break from this prompt when an error is received?The text was updated successfully, but these errors were encountered: