Download the file and extract it and we can see the file named 'one'
Check what kind of the file it is using the command 'file'
Okie let's try executing it
So we have to look inside the compiled file for that we have to de-compile it. Download the tool uncompyle2[only for python2.7] and install it. Run uncomple2 on our file
So they are doing some operation and getting the flag in variable 'flag'. Copy the code and modify it to output the flag, that is add the line print(flag) to the end before 'raw_input()' and execute the new python code.
The output is
md5('python_is_still_cool')
Find the md5 and it's the flag.
Check what kind of the file it is using the command 'file'
# file one one: python 2.7 byte-compiled
Okie let's try executing it
# python one
Gives no O/P just reads what you give as I/P and terminates.So we have to look inside the compiled file for that we have to de-compile it. Download the tool uncompyle2[only for python2.7] and install it. Run uncomple2 on our file
#uncompyle2 one # 2014.02.28 10:34:22 IST #Embedded file name: one.py eflag = [131, 138, 219, 198, 201, 158, 151, 154, 134, 129, 128, 177, 135, 157, 177, 157, 154, 135, 130, 130, 177, 141, 129, 129, 130, 201, 199] flag = ''.join(map(chr, map(lambda x: x ^ 238, eflag))) raw_input() +++ okay decompyling one # decompiled 1 files: 1 okay, 0 failed, 0 verify failed # 2014.02.28 10:34:22 IST
So they are doing some operation and getting the flag in variable 'flag'. Copy the code and modify it to output the flag, that is add the line print(flag) to the end before 'raw_input()' and execute the new python code.
The output is
md5('python_is_still_cool')
Find the md5 and it's the flag.
0 comments:
Post a Comment