Press "Enter" to skip to content

[HITCON] Handcrafted pyc – 50pts

Description

Can your brain be a Python VM? (Please use Python 2.7)

crackme.py

Hint

None

 

Solution

Firstly, we have converted it to pyc files.

We try to decompile it by using uncomple2 , but we found that it missed 8 bytes of pyc header.

%e6%9c%aa%e5%91%bd%e5%90%8d

After we fixed the file, it is able to decompile and we got a part of data

%e6%9c%aa%e5%91%bd%e5%90%8d

Here is the comparison part, so we can trace the flag here

%e6%9c%aa%e5%91%bd%e5%90%8d%e6%9c%aa%e5%91%bd%e5%90%8d

Finally we got

Convert all of the ascii code to string to get the flag.

hitcon{Now you can compile and run python bytecode in your brain!}

Comments