Skip to content

Commit

Permalink
Fix AttributeError instead of EOFError
Browse files Browse the repository at this point in the history
  • Loading branch information
Arusekk committed Jul 8, 2019
1 parent b0e1ce3 commit dce8fde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnlib/tubes/sock.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def send_raw(self, data):
self.sock.sendall(data)
except IOError as e:
eof_numbers = [errno.EPIPE, errno.ECONNRESET, errno.ECONNREFUSED]
if e.message == 'Socket is closed' or e.errno in eof_numbers:
if e.errno in eof_numbers or 'Socket is closed' in e.args:
self.shutdown("send")
raise EOFError
else:
Expand Down

0 comments on commit dce8fde

Please sign in to comment.