-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to exit interactive()
when EOF received?
#2106
Labels
Comments
Here's an example I'm using to test: #!/usr/bin/env python3
from pwn import *
def check_connection(p):
print('p.proc.stdin.closed:', p.proc.stdin.closed)
print('p.proc.stdout.closed:', p.proc.stdout.closed)
print("p.connected('send'):", p.connected('send'))
print("p.connected('recv')", p.connected('recv'))
print("p.can_recv()", p.can_recv())
print('')
p = process('/bin/ls')
check_connection(p)
p.interactive()
check_connection(p)
try:
p.send(b'A')
except:
pass
check_connection(p) Output:
So the EOFError happened in the middle of |
This hacky patch seems to fix the issue: gsingh93@4873414 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: