Level 3 - Rotary Precision (Misc)

When we look at the file we see a bunch of things like:
Upon further research, this turns out to be gcode, which essentially tells a 3D printer how to move, extrude filament, and control temperatures to build a 3D object layer by layer. I used various online and downloadable tools to visualise the image, but I couldn't see anything that resembled a flag (it was just a 3D image of a dragon).
Then we notice these suspicious lines:
GPT eventually recognised these lines as IEEE-754 steganography hiding the flag text in X/Y coordinates. It gave me this decoder:
This is the script's output:
After scrutinising this for some time, it turns out to be an obfuscated python snippet wherein every two adjacent letters (including the newline character) are swapped. The first line is the ciphertext which also got swapped.
It's actually doing something like this:
Now we can simply write a script that brutes all likely keys from 0 to 31, and prints the flag if found:
Last updated