From irc I found out that the data was encoded in ebcdic instead of ascii (str.encode("cp1140") in Python3).
I just kind of assumed it would be an xor stream reused on all 3 files, and made a quick test to find the string flag{ in 3:
- For each offset
iin 3:- xor
flag{with the data in 3 at offsetito get the (potential) key at that offset - xor that value with the data at 2 and 1 at the same offset
- If that data looks like text, return
i
- xor
This became findOffset() in solve.py, and confirmed: the encoding was an xor stream, both files 1 and 2 were text, and the
flag was in file 3.
Then I tried testing all possible next characters in the flag after the open curly brace, and kept the ones that made the
decryption of 1 and 2 look the best. The hardest part of this challenge, by far, was figuring out that 1 decrypted to some
weird characters (\n3·A·) in the middle. (by this time my team had already solved the challenge using cribbing,
whatever that means)
The flag ended up being: flag{https://i.imgur.com/ZNem5o3.gifv}