worked on the chall
This commit is contained in:
25
healthcheck.py
Normal file
25
healthcheck.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from solve import main
|
||||
from gen_files import generate_scrambled_qrcode
|
||||
import random
|
||||
from pathlib import Path
|
||||
import string
|
||||
|
||||
visible_chars = string.ascii_letters + string.digits
|
||||
random_bytes = "".join(random.choice(visible_chars) for _ in range(10))
|
||||
|
||||
test_flag = f"h4tum{{healthy_healthy_healthchecks_{random_bytes}}}"
|
||||
|
||||
|
||||
generate_scrambled_qrcode(
|
||||
seed=test_flag,
|
||||
output_dir=Path("tmp/health_check"),
|
||||
decoy=True,
|
||||
name=f"{random_bytes}.png"
|
||||
)
|
||||
|
||||
output = main(f"tmp/health_check/{random_bytes}.png", False)
|
||||
|
||||
if output and test_flag in output:
|
||||
print("Healthy!")
|
||||
else:
|
||||
print("Oh oh somethings wrong :()")
|
||||
Reference in New Issue
Block a user