Skip to content

Instantly share code, notes, and snippets.

@peternguyen93
Created April 14, 2018 10:48
Show Gist options
  • Save peternguyen93/30812a801bf9ca15b413b5b0bea6257e to your computer and use it in GitHub Desktop.
Save peternguyen93/30812a801bf9ca15b413b5b0bea6257e to your computer and use it in GitHub Desktop.
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