mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-04-27 19:16:08 -04:00
11 lines
363 B
Python
11 lines
363 B
Python
#! /usr/bin/env python
|
|
import sys
|
|
from libdisasm import disasm,disasmbuf
|
|
dbuf = disasmbuf.DisasmBuffer(sys.stdin.read( ))
|
|
d=disasm.LinearDisassembler( )
|
|
d.disassemble(dbuf)
|
|
for rva,opcode in dbuf.instructions( ):
|
|
operands = map(lambda x:"%s %-13s" % (x.access( ),"[%s]" % str(x)),
|
|
opcode.operands( ))
|
|
print "%08x: %-20s %s" % (rva,str(opcode), "".join(operands))
|