Skip to content

Commit

Permalink
Fix SSL timeout error on py2
Browse files Browse the repository at this point in the history
Turns out that python 2 does not raise correct socket.timeout, but
SSLError instead.  With no errno.  Just a message that might be
localized in some circumstances.

**THIS IS NOT THE ONLY TIME PYTHON 2 IS CAUSING PROBLEMS.**
Time to stop using it, dear exploit developers.  It is dead now.
But here you are: the simple fix.

Closes #1356
  • Loading branch information
Arusekk committed Aug 17, 2020
1 parent 9e0aa32 commit 69935eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pwnlib/tubes/sock.py
Expand Up @@ -48,6 +48,8 @@ def recv_raw(self, numb, *a):
raise EOFError
elif e.errno == errno.EINTR:
continue
elif 'timed out' in e.message:
return None
else:
raise

Expand Down

0 comments on commit 69935eb

Please sign in to comment.