From 4e56da2c65ce4627710022201ae6c44b670ecb64 Mon Sep 17 00:00:00 2001 From: cato447 Date: Wed, 14 Jan 2026 23:34:39 +0100 Subject: [PATCH] finished deployment --- description.yml | 14 ++++++-------- solve.py | 7 +++++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/description.yml b/description.yml index 0822aee..aca0340 100644 --- a/description.yml +++ b/description.yml @@ -1,7 +1,6 @@ -mosaic: # replace with actual short name +mosaic: name: "mega obfuscated secure advanced information communication" - author: "cato447" # will be displayed on CTFd - # Estimated difficulty + author: "cato447" difficulty: easy description: "The TAs creating the endterm exam have suffered in the past from leaked drafts. To protect themselves against further leaks they invented the *mega obfuscated secure advanced information communication* (mosaic) system. @@ -10,14 +9,13 @@ We found a QR-Code that was not disposed properly in a waste bin. Can you decipher the email? Hint: 1. The mosaic algorithm adds decoy fake data to the QR-Code. It is mega secure after all! -2. Save yourself from the headache of searching for QR-Code libraries: https://github.com/NaturalHistoryMuseum/pyzbar" +2. Save yourself from the headache of searching for QR-Code libraries. My solution uses: https://github.com/NaturalHistoryMuseum/pyzbar" category: misc flag: content: "h4tum{sm4ll_key_spac3s_are_deadly}" dynamic: true - files: dynamic # dynamic requires a gen_files script + files: dynamic dependencies: type: debian - system: ["python3", "libzbar0"] - python: ["pillow", "qrcode", "pyzbar", "numpy", "tqdm"] - check: "python3 solve.py" + system: ["python3"] + python: ["pillow", "qrcode"] diff --git a/solve.py b/solve.py index a8420b1..fa1531e 100644 --- a/solve.py +++ b/solve.py @@ -103,7 +103,7 @@ def solve_combo(combo): return None -def main(img_path="files/secret_message.png", verbose=True): +def main(img_path="./output/secret_message.png", verbose=True): img = Image.open(img_path) global new_image new_image = Image.new("RGB", (img.height, img.height)) @@ -144,5 +144,8 @@ def main(img_path="files/secret_message.png", verbose=True): if __name__ == "__main__": - main() + if len(sys.argv) == 2: + main(sys.argv[1]) + else: + main()