1
0
mirror of https://github.com/bitdefender/bddisasm.git synced 2024-12-22 22:18:09 +00:00
bddisasm/bindings/pybddisasm
BITDEFENDER\vlutas 9ba1e6a2f9 Added support for new Intel instructions, per Intel ISA extensions document #319433-046 (September 2022): PREFETCHITI, RAO-INT, CMPCCXADD, WRMSRNS, MSRLIST, AMX-FP16, AVX-IFMA, AVX-NE-CONVERT, AVX-VNNI-INT8.
Multiple minor fixes to existing instructions.
Moved x86 decoding tests in a separate directory & improved the test script.
2022-10-04 12:22:59 +03:00
..
_pybddisasm Move pybddisasm to the bindings directory 2021-10-20 09:32:50 +03:00
pybddisasm Move pybddisasm to the bindings directory 2021-10-20 09:32:50 +03:00
LICENSE Move pybddisasm to the bindings directory 2021-10-20 09:32:50 +03:00
MANIFEST.in Move pybddisasm to the bindings directory 2021-10-20 09:32:50 +03:00
README.md Move pybddisasm to the bindings directory 2021-10-20 09:32:50 +03:00
setup.cfg Move pybddisasm to the bindings directory 2021-10-20 09:32:50 +03:00
setup.py Added support for new Intel instructions, per Intel ISA extensions document #319433-046 (September 2022): PREFETCHITI, RAO-INT, CMPCCXADD, WRMSRNS, MSRLIST, AMX-FP16, AVX-IFMA, AVX-NE-CONVERT, AVX-VNNI-INT8. 2022-10-04 12:22:59 +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