updated sigalarm time
This commit is contained in:
@@ -146,7 +146,7 @@ class Phew(Challenge):
|
|||||||
if proc.poll() is None:
|
if proc.poll() is None:
|
||||||
proc.kill()
|
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"
|
assert ct1 and self._HEX_RE.match(ct1), "encrypt(1) did not return hex"
|
||||||
self.logger.info("[ok] encrypt produced hex")
|
self.logger.info("[ok] encrypt produced hex")
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class Sheesh(Challenge):
|
|||||||
|
|
||||||
self._send_line(proc, "1")
|
self._send_line(proc, "1")
|
||||||
self._read_until(proc, "pt: ", timeout=3.0)
|
self._read_until(proc, "pt: ", timeout=3.0)
|
||||||
pt_hex = "414243444546" # "ABCDEF"
|
pt_hex = "414243444546"
|
||||||
self._send_line(proc, pt_hex)
|
self._send_line(proc, pt_hex)
|
||||||
out = self._read_until(proc, "\n\n", timeout=3.0)
|
out = self._read_until(proc, "\n\n", timeout=3.0)
|
||||||
ct_hex = self._expect_hex_field(out, "ct")
|
ct_hex = self._expect_hex_field(out, "ct")
|
||||||
@@ -174,16 +174,6 @@ class Sheesh(Challenge):
|
|||||||
raise AssertionError("Program did not exit after option 4")
|
raise AssertionError("Program did not exit after option 4")
|
||||||
self.logger.info("[ok] service exit on 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')
|
self.logger.info('Check passed for sheesh')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -1,3 +1,5 @@
|
|||||||
home = /usr/bin
|
home = /usr/bin
|
||||||
include-system-site-packages = false
|
include-system-site-packages = false
|
||||||
version = 3.9.23
|
version = 3.11.6
|
||||||
|
executable = /usr/bin/python3.11
|
||||||
|
command = /usr/bin/python3 -m venv /media/sf_Gemastik2025/root/gemastik18-final/receiver
|
||||||
|
|||||||
Vendored
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
import signal
|
import signal
|
||||||
from Pailier import *
|
from Pailier import *
|
||||||
from Crypto.Util.number import *
|
from Crypto.Util.number import *
|
||||||
signal.alarm(10)
|
signal.alarm(20)
|
||||||
with open("/flag.txt", "rb") as f:
|
with open("/flag.txt", "rb") as f:
|
||||||
flag = f.read()
|
flag = f.read()
|
||||||
flag = bytes_to_long(flag)
|
flag = bytes_to_long(flag)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import signal
|
import signal
|
||||||
from Pailier import *
|
from Pailier import *
|
||||||
from Crypto.Util.number import *
|
from Crypto.Util.number import *
|
||||||
signal.alarm(10)
|
signal.alarm(20)
|
||||||
with open("/flag.txt", "rb") as f:
|
with open("/flag.txt", "rb") as f:
|
||||||
flag = f.read()
|
flag = f.read()
|
||||||
flag = bytes_to_long(flag)
|
flag = bytes_to_long(flag)
|
||||||
|
|||||||
Reference in New Issue
Block a user