diff --git a/receiver/challenges/Phew.py b/receiver/challenges/Phew.py index a56de5a..c77ab42 100644 --- a/receiver/challenges/Phew.py +++ b/receiver/challenges/Phew.py @@ -146,7 +146,7 @@ class Phew(Challenge): if proc.poll() is None: proc.kill() - ct1 = run_encrypt_once("414243444546") # "ABCDEF" + ct1 = run_encrypt_once("414243444546") assert ct1 and self._HEX_RE.match(ct1), "encrypt(1) did not return hex" self.logger.info("[ok] encrypt produced hex") diff --git a/receiver/challenges/Sheesh.py b/receiver/challenges/Sheesh.py index 107e2dd..d6b1544 100644 --- a/receiver/challenges/Sheesh.py +++ b/receiver/challenges/Sheesh.py @@ -91,7 +91,7 @@ class Sheesh(Challenge): self._send_line(proc, "1") self._read_until(proc, "pt: ", timeout=3.0) - pt_hex = "414243444546" # "ABCDEF" + pt_hex = "414243444546" self._send_line(proc, pt_hex) out = self._read_until(proc, "\n\n", timeout=3.0) ct_hex = self._expect_hex_field(out, "ct") @@ -174,16 +174,6 @@ class Sheesh(Challenge): raise AssertionError("Program did not exit after option 4") self.logger.info("[ok] service exit on 4") - # Skip alarm test during SLA checks (takes 180+ seconds) - # proc_alarm = self._spawn() - # self._read_until(proc_alarm, "zzz", timeout=190.0) # 180s + slack - # try: - # proc_alarm.wait(timeout=5.0) - # except subprocess.TimeoutExpired: - # proc_alarm.kill() - # raise AssertionError("Alarm fired but process did not exit") - # self.logger.info("[ok] alarm fired ('zzz') and process self-terminated") - self.logger.info('Check passed for sheesh') return True diff --git a/receiver/pyvenv.cfg b/receiver/pyvenv.cfg index a30fa8d..dd70484 100644 --- a/receiver/pyvenv.cfg +++ b/receiver/pyvenv.cfg @@ -1,3 +1,5 @@ home = /usr/bin include-system-site-packages = false -version = 3.9.23 \ No newline at end of file +version = 3.11.6 +executable = /usr/bin/python3.11 +command = /usr/bin/python3 -m venv /media/sf_Gemastik2025/root/gemastik18-final/receiver diff --git a/services/phew/dist/chall.py b/services/phew/dist/chall.py index cb18014..6fb1507 100644 --- a/services/phew/dist/chall.py +++ b/services/phew/dist/chall.py @@ -3,7 +3,7 @@ import signal from Pailier import * from Crypto.Util.number import * -signal.alarm(10) +signal.alarm(20) with open("/flag.txt", "rb") as f: flag = f.read() flag = bytes_to_long(flag) diff --git a/services/phew/src/chall.py b/services/phew/src/chall.py index cb18014..6fb1507 100644 --- a/services/phew/src/chall.py +++ b/services/phew/src/chall.py @@ -3,7 +3,7 @@ import signal from Pailier import * from Crypto.Util.number import * -signal.alarm(10) +signal.alarm(20) with open("/flag.txt", "rb") as f: flag = f.read() flag = bytes_to_long(flag)