finished deployment
This commit is contained in:
@@ -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"]
|
||||
|
||||
7
solve.py
7
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user