Init. Commit

This commit is contained in:
Caplag
2026-09-17 00:50:07 +03:00
commit 880d8698d6
115 changed files with 7611 additions and 0 deletions
@@ -0,0 +1,31 @@
#!/usr/bin/env python3
import importlib.util
import json
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def load_client():
path = ROOT / "public" / "kem_client.py"
spec = importlib.util.spec_from_file_location("nullroute_client", path)
module = importlib.util.module_from_spec(spec)
assert spec.loader is not None
spec.loader.exec_module(module)
return module
def main() -> None:
client = load_client()
capsule = json.loads((ROOT / "public" / "capsule.json").read_text())
plaintext = client.decrypt_capsule(capsule).decode()
match = re.search(r"caplag\{[^}]+\}", plaintext)
if not match:
raise SystemExit("flag not found")
print(match.group(0))
if __name__ == "__main__":
main()