Skip to main content

The Bitdefender disassembler Python wrapper

Project description

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 module:

import pybddisasm

ret, instr = pybddisasm.nd_decode_ex(code, def_code, def_data, def_stack)

Example

import pybddisasm

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

while offset < len(code):
    _, instr = pybddisasm.nd_decode_ex(code[offset:], len(code[offset:]), pybddisasm.ND_CODE_64, pybddisasm.ND_DATA_64)

    if instr is None:
        break

    _, text = pybddisasm.nd_to_text(instr, 0x0)
    print(text)

    offset += instr.Length

Pip

Use pip to install the package:

pip install pybddisasm

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pybddisasm-0.3.0-cp311-cp311-win_amd64.whl (280.8 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

pybddisasm-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pybddisasm-0.3.0-cp310-cp310-win_amd64.whl (280.8 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pybddisasm-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pybddisasm-0.3.0-cp39-cp39-win_amd64.whl (280.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pybddisasm-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pybddisasm-0.3.0-cp38-cp38-win_amd64.whl (280.7 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

pybddisasm-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

pybddisasm-0.3.0-cp37-cp37m-win_amd64.whl (280.4 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

pybddisasm-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.28+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page