🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ida-domain

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ida-domain

IDA Domain API - Python interface for IDA Pro reverse engineering platform

0.1.0rc5
PyPI
Maintainers
2

IDA Domain

PyPI version Python Support License: MIT

This project provides a Domain Model for IDA Pro, allowing seamless interaction with IDA SDK components via Python.

🚀 Features

  • Domain Model Interface: Clean, Pythonic API on top of IDA Python
  • Fully compatible with IDA Python SDK: Can be used alongside the IDA Python SDK
  • Easy Installation: Simple pip install from PyPI
  • Documentation: API reference and usage examples
  • Cross-Platform: Works on Windows, macOS, and Linux

📦 Installation

Prerequisites

Set the IDADIR environment variable to point to your IDA installation directory:

export IDADIR="[IDA Installation Directory]"

Example:

export IDADIR="/Applications/IDA Professional 9.1.app/Contents/MacOS/"

Note: If you have already installed and configured the idapro Python package, setting IDADIR is not required.

Install from PyPI

pip install ida-domain

🎯 Usage Example

Here is an example showing how to use IDA Domain to analyze a binary:

#!/usr/bin/env python3
"""
Database exploration example for IDA Domain API.

This example demonstrates how to open an IDA database and explore its basic properties.
"""

import argparse

import ida_domain

def explore_database(db_path):
    """Explore basic database information."""
    ida_options = ida_domain.Database.IdaCommandBuilder().auto_analysis(True).new_database(True)
    db = ida_domain.Database()
    if db.open(db_path, ida_options):
        # Get basic information
        print(f'Address range: {hex(db.minimum_ea)} - {hex(db.maximum_ea)}')

        # Get metadata
        print('Database metadata:')
        for key, value in db.metadata.items():
            print(f'  {key}: {value}')

        # Count functions
        function_count = 0
        for _ in db.functions.get_all():
            function_count += 1
        print(f'Total functions: {function_count}')

        db.close(save=False)

def main():
    """Main entry point with argument parsing."""
    parser = argparse.ArgumentParser(description='Database exploration example')
    parser.add_argument(
        '-f', '--input-file', help='Binary input file to be loaded', type=str, required=True
    )
    args = parser.parse_args()
    explore_database(args.input_file)

if __name__ == '__main__':
    main()

📖 Documentation

Complete documentation is available at: https://ida-domain.docs.hex-rays.com/

  • API Reference: Documentation of available classes and methods
  • Getting Started: Complete setup guide including installation and first steps
  • Examples: Usage examples for common tasks

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

ida

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts