Skip to content

Instantly share code, notes, and snippets.

@extremecoders-re
Last active May 11, 2016 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save extremecoders-re/91774c406336e68141e44ee95a376d68 to your computer and use it in GitHub Desktop.
Save extremecoders-re/91774c406336e68141e44ee95a376d68 to your computer and use it in GitHub Desktop.
>>> import marshal, dis
>>> f = open('1.pyc', 'rb')
>>> f.seek(8)
>>> co = marshal.load(f)
>>> dis.disassemble(co)
1 >> 0 SETUP_EXCEPT 99 (to 102)
3 <144> 387
6 STOP_CODE
7 JUMP_FORWARD 217 (to 227)
10 <157> 44944
13 LOAD_NAME 28929
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\dis.py", line 97, in disassemble
print '(' + co.co_names[oparg] + ')',
IndexError: tuple index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment