Can you read the flag?
So, i've received only the image
It seems that the challenger pasted the flag four times then shuffled it somehow..
Taking a closer look we can see what possibly happened. The image was cutted in
1px lines then shuffled!
Well, we need to unshuffle it, but how? Doing by hand is not an option.
I started by cropping it from image..
..then, wrote a script to:
- slice the image line by line, 1px of height
- put filenames into an array
- shuffle the array
- rejoin the pieces
- loop it N times and join the results
The result is
flag.jpg, a big file w/ 100 iterations..
And luckly you will get a readable iteration..
if not, try again until you get!
The title tip
Thxhelped me a lot!
- Stackoverflow - Cutting one image into multiple images using the Python Image Library - https://stackoverflow.com/questions/6059217/cutting-one-image-into-multiple-images-using-the-python-image-library
- Stackoverflow - Combine several images horizontally with Python - https://stackoverflow.com/questions/30227466/combine-several-images-horizontally-with-python