攻防世界_Re_新手区_python-trade

pyc文件,使用EasyPythonDecompiler反汇编

得到源码

# Embedded file name: 1.py import base64  def encode(message):     s = ''     for i in message:         x = ord(i) ^ 32         x = x + 16         s += chr(x)      return base64.b64encode(s)   correct = 'XlNkVmtUI1MgXWBZXCFeKY+AaXNt' flag = '' print 'Input flag:' flag = raw_input() if encode(flag) == correct:     print 'correct' else:     print 'wrong'

直接上脚本8

import base64 correct = 'XlNkVmtUI1MgXWBZXCFeKY+AaXNt' x=base64.b64decode(correct) for i in x:   s=(int(i)-16)^32   print(chr(s),end='')

flag
nctf{d3c0mpil1n9_PyC}