Skip to content

Commit

Permalink
Fix exception handling in ClientHost to include OSError
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorNelson committed Feb 22, 2025
1 parent b1c137f commit 2b850f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions intercepting-communication/level-7/run
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/exec-suid --real -- /usr/bin/python -I

import os
import socket
import subprocess
import time
from dojjail import Host, Network

Expand All @@ -17,7 +15,7 @@ class ClientHost(Host):
client_socket.sendall(flag.encode())
client_socket.close()
time.sleep(1)
except (ConnectionError, TimeoutError):
except (OSError, ConnectionError, TimeoutError):
continue

user_host = Host("ip-10-0-0-1")
Expand Down

0 comments on commit 2b850f4

Please sign in to comment.