Tags: reversing pytecode zh3r0ctf bytecode python 2020 

Rating: 1.0

[original writeup](https://github.com/ctfwaifu/writeups-2020/tree/master/Zh3r0-ctf/snakes_everywhere)
```python
def ss_reverse():
key = 'I_l0v3_r3v3r51ng'
cipher = '⋊⚗ᖂᕝᘜ\u187cᶪ㗛᜔\u2fe7ᘓヱᎷጱ\u2d2c\u2e54᮹⪾ゖণ㉒\u139b⠪㗹G\x1e\\\x1cjU\x07\x14(,\x1f\x03\x1bQ3\x0bl\x1f@RC\x02\x1c\x1e\x16\x1aXC\x0fN'

l_f = 38 # known length of flag

f = ''
for i in range(l_f // 3):
f += chr(int( (ord(cipher[i]) + i) / ord(key[i]) ))
for i in range(l_f // 3, l_f // 3 * 2):
f += chr(int(( ord(cipher[i]) - i ) / ord(key[i % len(key)])))
for i in range(24,54):
f += xor(key[i % 16], cipher[i])

print(f)

def xor(str1, str2): return chr(ord(str1) ^ ord(str2))

ss_reverse()
```

output : ```zh3r0{Python_disass3mblython_disass3mbly_is v3ry_E4sy}```

flag: ```zh3r0{Python_disass3mbly_is_v3ry_E4sy}```

Original writeup (https://github.com/ctfwaifu/writeups-2020/tree/master/Zh3r0-ctf/snakes_everywhere).