In a previous post, we’ve seen how to wrap the diStorm disassembler library in Python, using ctypes. This still left us with the task of building the dynamic link library for our platform and installing it manually, which is not as easy as it may seem – among other small problems you may find, the new versions of Visual Studio try to force the use of the latest C++ runtime redistributables, which may not be present in most Windows installations.
Today, I’m introducing a new ctypes wrapper for diStorm, this time with all binaries prebuilt and packaged together. The installer script automatically detects the target platform and installs the right binary. It comes with the following prebuilt binaries:
- Windows on x86 and AMD64 processors
- Linux on x86 and AMD64 processors (built using Ubuntu, but should work in other distros)
- Mac OS X on x86 and PowerPC processors (untested, I don’t have a Mac to play with yet)
Since the installer code is pretty much generic, it should be easy to add new platforms by simply creating the corresponding subdirectory and placing the python code and prebuilt binary in it. Contributions are welcome! 🙂
Download
Python 2.x
- Source code (all platforms): distorm-1.7.30.zip
- Source code (all platforms): distorm-1.7.30.tar.gz
- Windows 32 bits installer: distorm-1.7.30.win32.exe
- Windows 32 bits MSI installer: distorm-1.7.30.win32.msi
- Windows 64 bits installer: distorm-1.7.30.win-amd64.exe
- Windows 64 bits MSI installer: distorm-1.7.30.win-amd64.msi
Python 3.x
- Source code (all platforms): distorm-1.7.30.zip
- Source code (all platforms): distorm-1.7.30.tar.gz
- Windows 32 bits installer: distorm-1.7.30.win32.exe
- Windows 32 bits MSI installer: distorm-1.7.30.win32.msi
- Windows 64 bits installer: distorm-1.7.30.win-amd64.exe
- Windows 64 bits MSI installer: distorm-1.7.30.win-amd64.msi