Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CreateRemoteThread/03e7da96e5500306f0e960861ae63232 to your computer and use it in GitHub Desktop.
Save CreateRemoteThread/03e7da96e5500306f0e960861ae63232 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
from capstone import *
for i in range(1,9):
f = open("pieces/fragment_%d.dat" % i)
md = Cs(CS_ARCH_X86,CS_MODE_32)
n = 0
for x in md.disasm(f.read(),0x1000):
if n > 5:
break
else:
print "%d %s\t%s" % (i,x.mnemonic,x.op_str)
n += 1
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment