1
0
mirror of https://github.com/bitdefender/bddisasm.git synced 2024-12-22 22:18:09 +00:00
bddisasm/pybddisasm
Andrei Vlad LUTAS f6050661d5 Multiple improvements in bdshemu
Fixed an emulation bug for MOVZX and MOVSX instructions (https://github.com/bitdefender/bddisasm/issues/48)
New shellcode flag - call tot Wow32 reserved.
New shellcode flag - heaven's gate.
New shellcode flag - stack-pivot.
Moved bdshemu tests in a password protected zip file, so it doesn't trigger AV detections.
2021-08-10 11:43:51 +03:00
..
_pybddisasm pybddisasm: Don't implement nd_vsnprintf_s and nd_memset 2021-03-30 22:04:02 +03:00
pybddisasm Modified the python-disassembler-wraper to be able to be installed using pip. 2020-08-04 13:57:03 +03:00
LICENSE Modified the python-disassembler-wraper to be able to be installed using pip. 2020-08-04 13:57:03 +03:00
MANIFEST.in Modified the python-disassembler-wraper to be able to be installed using pip. 2020-08-04 13:57:03 +03:00
README.md Add copy-pastable python example 2020-11-17 10:28:13 -05:00
setup.cfg Modified the python-disassembler-wraper to be able to be installed using pip. 2020-08-04 13:57:03 +03:00
setup.py Multiple improvements in bdshemu 2021-08-10 11:43:51 +03:00

The Bitdefender disassembler Python wrapper

Build

Building and installing is easy:

python3 setup.py build
python3 setup.py install

Usage

Use it by importing the pybddisasm.disasm module:

from pybddisasm.bddisasm import *

instr = nd_decode_ex2(buff, arch, arch, arch, vendor, current_rip)

Example

from pybddisasm.bddisasm import *
from sys import *

buff = b"\x55\x48\x8b\x05\xb8\x13\x00\x00"
offset = 0

while offset < getsizeof(buff):
    instr = nd_decode_ex2(buff[offset:], 64, 64, 64)

    if instr is None:
        break

    print(instr.Text)

    offset += instr.Length

Pip

Use pip to install the package:

pip install pybddisasm