Challenge 2 Challenge 2 is simple yet interesting. The initial target is a Python 2.2 byte-compiled file, so the first job is to decompile it to get the source code. Fortunately, decompyle just works: $ decompyle newbie.pyc Thu Aug 27 02:13:25 2009 # emacs-mode: -*- python-*- import urllib def some_cryption(arg): pass a = 'http://' dummy = 'http://korea' b = 'uxcpb.xe' b = b.encode('rot13') c = 'co.kr' cs = '.com' d = '/vfrp/uxuxux' dt = '/hackers' d = d.encode('rot13') dx = 'coolguys' ff = urllib.urlopen(((a + b) + d)) f_data = ff.read() file = open('hkhkhk', 'w') file.write(f_data) some_cryption(f_data) file.close()
WOWHacker CTF - Binary Challenges
WOWHacker CTF - Binary Challenges
WOWHacker CTF - Binary Challenges
Challenge 2 Challenge 2 is simple yet interesting. The initial target is a Python 2.2 byte-compiled file, so the first job is to decompile it to get the source code. Fortunately, decompyle just works: $ decompyle newbie.pyc Thu Aug 27 02:13:25 2009 # emacs-mode: -*- python-*- import urllib def some_cryption(arg): pass a = 'http://' dummy = 'http://korea' b = 'uxcpb.xe' b = b.encode('rot13') c = 'co.kr' cs = '.com' d = '/vfrp/uxuxux' dt = '/hackers' d = d.encode('rot13') dx = 'coolguys' ff = urllib.urlopen(((a + b) + d)) f_data = ff.read() file = open('hkhkhk', 'w') file.write(f_data) some_cryption(f_data) file.close()