反编译为out.py文件
得到代码,意思是将传入的字符串分五个一组,md5加密,作为16进制转10进制(int函数),然后依次与md5s数组进行比较
附代码:
1 # uncompyle6 version 3.4.0 2 3 # Python bytecode 2.7 (62211) 4 5 # Decompiled from: Python 2.7.9 (default, Mar 1 2015, 12:57:24) 6 7 # [GCC 4.9.2] 8 9 # Embedded file name: unvm_me.py 10 11 # Compiled at: 2016-12-21 05:44:01 12 13 import md5 14 15 md5s = [ 16 17 174282896860968005525213562254350376167L, 137092044126081477479435678296496849608L, 126300127609096051658061491018211963916L, 314989972419727999226545215739316729360L, 256525866025901597224592941642385934114L, 115141138810151571209618282728408211053L, 8705973470942652577929336993839061582L, 256697681645515528548061291580728800189L, 39818552652170274340851144295913091599L, 65313561977812018046200997898904313350L, 230909080238053318105407334248228870753L, 196125799557195268866757688147870815374L, 74874145132345503095307276614727915885L] 18 19 print 'Can you turn me back to python ? ...' 20 21 flag = raw_input('well as you wish.. what is the flag: ') 22 23 if len(flag) > 69: 24 25 print 'nice try' 26 27 exit() 28 29 if len(flag) % 5 != 0: 30 31 print 'nice try' 32 33 exit() 34 35 for i in range(0, len(flag), 5): 36 37 s = flag[i:i + 5] 38 39 if int('0x' + md5.new(s).hexdigest(), 16) != md5s[(i / 5)]: 40 41 print 'nice try' 42 43 exit() 44 45 print 'Congratz now you have the flag'
把md5s转换为16进制(hex函数)
拿到md5解密网站解密,有一个没有解出来,发现是少了一位
查看原来的10进制数据发现其他的都是39位,未解出的是37位。猜想原来的md5首位应该是0,进制转换自动省略首位0(但是猜这里应该是原作者自己去掉0的),添加0解出密文。幸好都解出来了,如果没有要写五位数字+英文的爆破,那...太惨了吧不知道要爆到什么时候。
得到flag输入验证正确