ファイル manipulated_tictactoe.cpython-36.pyc と、Pythonのソースコード tictactoe.py が与えられた。
manipulated_tictactoe.cpython-36.pyc をバイナリエディタで開き、! を検索すると、
flagの最初のALLES!{が数バイトおきに入っている部分が見つかった。
また、その少し後にflagの最後の}も見つかった。
そこで、ファイル manipulated_tictactoe.cpython-36.pyc のファイル名に36と入っていることから、
以下のサイトでPython3.6を用意した。
A file manipulated_tictactoe.cpython-36.pyc and a Python source code tictactoe.py were given.
I opened manipulated_tictactoe.cpython-36.pyc with a binary editor and searched for !.
As a result, I found a part that contains the prefix of the flag ALLES!{ with a few other bytes between each of them.
Also I found the suffix of the flag } near the part.
Seeing this, I prepared Python3.6 from this page because the file name of manipulated_tictactoe.cpython-36.pyc contains 36.
Python Release Python 3.6.8 | Python.org
このPython3.6を用い、
Using this Python3.6, I used this command to compile tictactoe.py:
というコマンドで tictactoe.py のコンパイルを行った。
さらに、その結果を以下のプログラムで manipulated_tictactoe.cpython-36.pyc と比較し、違っているバイトを抽出した。
After that, I compared the compilation result with manipulated_tictactoe.cpython-36.pyc and extracted bytes that differ.
抽出結果にflagが含まれていた。
The extracted data contained the flag.