refractor blogpost and cdn chall

This commit is contained in:
Jonathan committed 2025-10-10 22:37:11 +07:00
1 parent 2d51b73a1e
commit bb3f6e74aa
47 files changed
-544

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# Convenience: reseed flag once without starting server
import hashlib, secrets, os
FLAG_PATH = os.path.join(os.path.dirname(__file__), "flag.txt")
sha = hashlib.sha256(secrets.token_bytes(32)).hexdigest()
with open(FLAG_PATH, "w", encoding="utf-8") as fh:
fh.write(f"GEMASTIK{{{sha}}}\n")
print("Flag reseeded:", open(FLAG_PATH).read().strip())