libTriton  version 0.4 build 1351
Python bindings

Table of Contents

[python api] All information about the libTriton's Python API.


The Triton Triton offers Python bindings on its C++ API which allow you to build analysis in Python as well as in C++.

Python API - Classes, methods, modules and namespaces of libTriton

By default, the libTriton contains Python bindings and can be loaded with a classical Python import.

1 >>> from triton import *

If you want to use the libTriton without Python bindings, recompile the project with the cmake flag -DTRITON_PYTHON_BINDINGS=no.





Python API - Methods and namespaces of the pintool

This project is shipped with a Pin Tracer which can be compile with the cmake flag -DPINTOOL=on. Then, the pintool must be used like this:

1 $ ./triton <> <your_targeted_binary>

Your script must contains the pintool and triton imports.

1 >>> from triton import *
2 >>> from pintool import *