added timeout scam
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user