Created
October 2, 2020 09:11
-
-
Save RDxR10/e4f9a5384abdd73e3a2eb352c4bd2ae5 to your computer and use it in GitHub Desktop.
Solution to Misc/Amidst Bits and Bases from darkCTF 2020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
with open("../crazy.txt", "r") as f: | |
dat = f.read() | |
lines = ''.join(dat.split("\n")[8:]) | |
pixels = [] | |
for i in lines: | |
if i == '1': | |
pixels += [(255,255,255,255)] | |
else: | |
pixels += [(0,0,0,255)] | |
img = Image.new("RGBA", (200,200)) | |
img.putdata(pixels) | |
img.save("qrcode.png") | |
print(lines) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment