Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
target = 'UOTp%I()<>S'
out = ''
for c in target:
found = False
for func_name in dir("")[::-1]:
try:
doc = getattr(getattr("",func_name),"__doc__")
if c in doc:
idx = doc.find(c)
out += "{0.%s.__doc__[%d]}" % (func_name,idx)
print c,"{0.%s.__doc__[%d]}" % (func_name,idx)
found = True
break
except TypeError:
pass
if not found:
print 'char %s not found' % c
print out,len(out) < 0xc0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment