added timeout scam

This commit is contained in:
Rayhan Hanaputra
2025-10-25 23:33:50 +07:00
parent 89b0bb4077
commit 4dbafc3d9e
+3 -3
View File
@@ -85,7 +85,7 @@ class Phew(Challenge):
def run_encrypt_once(pt_hex: str) -> str:
proc = self._spawn()
try:
self._read_until(proc, "> ", timeout=5.0)
self._read_until(proc, "> ", timeout=10.0)
self._send_line(proc, "1")
self._read_until(proc, "pt (hex)", timeout=3.0)
self._read_until(proc, "> ", timeout=3.0)
@@ -107,7 +107,7 @@ class Phew(Challenge):
def run_decrypt_once(ct_hex: str) -> str:
proc = self._spawn()
try:
self._read_until(proc, "> ", timeout=5.0)
self._read_until(proc, "> ", timeout=10.0)
self._send_line(proc, "3")
self._read_until(proc, "ct (hex)", timeout=3.0)
self._read_until(proc, "> ", timeout=3.0)
@@ -129,7 +129,7 @@ class Phew(Challenge):
def run_bingo_once() -> str:
proc = self._spawn()
try:
self._read_until(proc, "> ", timeout=5.0)
self._read_until(proc, "> ", timeout=10.0)
self._send_line(proc, "2")
out = self._read_until(proc, "\n", timeout=3.0)
ct_hex = self._expect_hex_field(out, "ct")