Skip to content

interruptlabs/ob-idapython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ob-idapython

ob-idapython brings the ability to interact with IDA Pro directly from Emacs using Org Babel. Inspired by idacode for VSCode.

Overview

With ob-idapython, you can execute Python code in IDA Pro from within your Org files. This is particularly useful for reverse engineering tasks, scripting, and automating workflows in IDA while maintaining all the benefits of Org mode in Emacs.

This package provides:

  • A simple interface to send Python code to an IDA Pro instance.
  • Integration with Org Babel for reproducible workflows.
  • Support for custom configurations to match your development setup.

Prerequisites

To use ob-idapython, ensure you have the following:

  1. IDA Pro installed.
  2. Python 3 configured with IDA.
  3. Emacs with Org mode installed.
  4. The plugin file ida_babel.py installed in IDA’s plugin directory.

Usage

First, start the IDA Babel Server.

images/start_server.png

Then, execute an idapython source block, and the results will be in the IDA console.

#+BEGIN_SRC idapython :host localhost :port 4000
  import idc
  func_name = idc.get_func_name(idc.here())
  print(f"Current function: {func_name}")
#+END_SRC

images/console.png

Installation

Place the ob-idapython directory in your Emacs load path, then add the following configuration to your Emacs init file:

(use-package ob-idapython
  :load-path "/path/to/ob-idapython/"
  :after org
  :config
  (progn
    (add-to-list 'org-babel-load-languages '(idapython . t))
    (add-to-list 'org-src-lang-modes '("idapython" . python))
    (require 'ob-idapython)))

Copy the ida_babel.py script to your IDA plugins directory.

IDA_USER_DIR="~/.idapro/"
ln -sf $(pwd)/ida_babel.py $IDA_USER_DIR/plugins/ida_babel.py

This will create a symbolic link to the plugin file in your IDA Pro user directory.

Open IDA Pro and navigate to File -> Plugins -> IDA Babel Server. Start the server from the menu.

About

org-babel functions for idapython

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published