idalib

idalib

IDA as a library (idalib) allows you to use the C++ and IDA Python APIs outside IDA as standalone applications. That way, IDA's engine is used inside your app, which simplifies development with the IDA APIs, which can be done now from your IDE of choice.

Prerequisites

  • IDA Pro 9.0 or newer installed and running

Installation for C++

To use the ida library from the C++, please refer to the idalib.hpp header file shipped with C++ SDK where you will find the relevant information.

Installation for Python

To use the ida library Python module, you need to install and configure idapro package by following these steps:

Install ida library Python module

  1. Navigate to the idalib/python folder within the IDA Pro installation directory

  2. Run the command: pip install .

When setting up idalib to work with IDA Feeds and your virtual environment (venv), make sure to run the above command from within your activated venv.

Setting up the ida library Python module

Run the Activation Script

  1. You need to inform the idapro Python module of your IDA Pro installation. To do this, run the py-activate-idalib.py script located in your IDA Pro installation folder, or inside the idalib/python folder (depends on the system version you use):

    If the -d option is omitted, the script will automatically select the IDA installation folder from which it was executed.

Using the ida library Python module

Import idapro in your script

  1. Make sure to import the idapro package as the first import in your Python script

    • After importing, you can utilize the existing ida Python APIs

Example script

For a reference on how to use the ida module, check the idalib/examples folder in your IDA Pro installation directory or look at the sample script provided below.

Last updated

Was this helpful?