1.easy_pyc
反编译
使用python反编译 - 在线工具反编译得到源代码
#!/usr/bin/env python # visit https://tool.lu/pyc/ for more information # Version: Python 2.7 print 'Welcome to CTFshow Re!' print 'your flag is here!' flag = '' l = len(flag) for i in range(l): num = ((flag[i] + i) % 114514 + 114514) % 114514 code += chr(num) code = map(ord, code) for i in range((l - 4) + 1): code[i] = code[i] ^ code[i + 1] print code code = [ '%16', '%1d', '%1e', '%1a', '%18', '\t', '%ff', '%d0', ',', '%03', '%02', '%14', '8', 'm', '%01', 'C', 'D', '%bd', '%f7', '*', '\r', '%da', '%f9', '%1c', '&', '5', "'", '%da', '%d4', '%d1', '%0b', '%c7', '%c7', '%1a', '%90', 'D', '%a1']
wp
Python提取一下数据的ASCLL值
data = ['\x16', '\x1d', '\x1e', '\x1a', '\x18', '\t', '\xff', '\xd0', ',', '\x03', '\x02', '\x14', '8', 'm', '\x01', 'C', 'D', '\xbd', '\xf7', '*', '\r', '\xda', '\xf9', '\x1c', '&', '5', "'", '\xda', '\xd4', '\xd1', '\x0b', '\xc7', '\xc7', '\x1a', '\x90', 'D', '\xa1'] code=list(map(ord,data)) print(code)
C++逆向两段循环
#include<iostream> using namespace std; int main(){ int code[]={22, 29, 30, 26, 24, 9, 255, 208, 44, 3, 2, 20, 56, 109, 1, 67, 68, 189, 247, 42, 13, 218, 249, 28, 38, 53, 39, 218, 212, 209, 11, 199, 199, 26, 144, 68, 161}; int s=sizeof(code)/sizeof(int); for(int i=s-3;i>=1;i--) code[i-1]=code[i-1]^code[i]; for(int i=0;i<s;i++){ int a=(code[i]-i)%114514; printf("%c",a); } return 0; }
Python
data = ['\x16', '\x1d', '\x1e', '\x1a', '\x18', '\t', '\xff', '\xd0', ',', '\x03', '\x02', '\x14', '8', 'm', '\x01', 'C', 'D', '\xbd', '\xf7', '*', '\r', '\xda', '\xf9', '\x1c', '&', '5', "'", '\xda', '\xd4', '\xd1', '\x0b', '\xc7', '\xc7', '\x1a', '\x90', 'D', '\xa1'] code=list(map(ord,data)) l=len(code) flag='' for i in range(l-3,0,-1): code[i-1]=code[i-1]^code[i]; for i in range(l): flag+=chr((code[i]-i)%114514) print(flag)
ctfshow{Just_F00l's_D@y_R3_Ch3ck-in!}