Introduction

pydasm is a python interface to libdasm, the best x86 disassembling library out there.

pydasm comes with libdasm, so no separate download will be offered in this page. What can be found here is information, documentation and projects using it.

An example from the readme file:

import pydasm

# Very silly, nop and some xor's
buffer = '\x90\x31\xc9\x31\xca\x31\xcb'

offset = 0
while offset < len(buffer):
    i = pydasm.get_instruction(buffer[offset:], pydasm.MODE_32)
    print pydasm.get_instruction_string(i, pydasm.FORMAT_INTEL, 0)
    if not i:
        break
    offset += i.length