IDA Pro plugin manager.
Project description
idaenv - IDAPython Plugin Management
idaenv is a plugin manager for the IDA Pro disassembler. It bridges the gap between IDA Pro and the greater Python ecosystem of setuptools/virtualenv.
Most Python packages are distributed using setuptools (or perhaps distutils) and the PyPi package repository. However IDA Pro expects extensions to be standalone files placed in a specific directory. Using idaenv, you can install Python packages into a virtual environment using setuptools (or pip), run a single "update" command, and immediately use plugins, processor modules, or loaders contained in the package.
Usage
If you're using IDA 7.3 or earlier, initialize a Python 2 virtual environment and activate it:
$ virtualenv -p python2 ida
$ ./ida/bin/activate
If you're using IDA 7.4 or later, it is recommended to use venv, which is included in the standard library.
$ python3 -m venv ida
$ ./ida/bin/activate
It is still possible to use virtualenv with Python 3, however you will encounter an exception when starting IDA 7.4 due to a longstanding issue in virtualenv.
Once virtual environment is activated, install idaenv:
$ pip install idaenv
Update the IDAUSR environment variable to include the idaenv plugin directory:
$ export IDAUSR=$HOME/.idapro:$( idaenv prefix )
Install some idaenv compatible extensions using setup.py or pip. Then use the idaenv "update" command:
$ pip install ...
$ idaenv update
Writing wrapper to '/home/me/.virtualenvs/cpy2/ida/plugins/keypatch_keypatch_f265c7.py'...
Writing wrapper to '/home/me/.virtualenvs/cpy2/ida/plugins/uemu_uemu_791c39.py'...
Updated:
- keypatch.keypatch
- uemu.uemu
... TODO include output ...
To see what plugins are installed, use the "ls" or "status" command.
$ idaenv ls
Plugins:
Active:
- keypatch.keypatch
- uemu.uemu
Mechanism
idaenv takes inspiration from the established console_scripts
mechanism in
Python. It generates and manages small wrapper scripts that import from an
installed package and then export the interface expected by IDA Pro. For
example, plugin wrappers use the following template:
from %(module)s import %(attr)s
def PLUGIN_ENTRY():
return %(attr)s()
Packaging
In order for idaenv to know where plugins are located inside of a package, they
have to be called out in setup.py
using "entry points". For example, the
declaration for a traditional plugin that consists of just a single file (like
the excellent keypatch) might look like:
from setuptools import setup
setup(name='keypatch',
version="0.0",
py_modules=["keypatch"],
install_requires=[
"keystone-engine"
],
zip_safe=False,
entry_points={
"idapython_plugins": [
"keypatch=keypatch:Keypatch_Plugin_t",
]
})
The structure of the entry points dictionary is described in detail by the setuptools documentation. The general structure is:
{
"entry_point_group": [
"plugin_name=module.submodule:PluginClass.plugin_method
]
}
idaenv supports the following entry point groups:
idapython_plugins
idapython_procs
idapython_loaders
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file idaenv-0.4.0.tar.gz
.
File metadata
- Download URL: idaenv-0.4.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85655525881d0b4f0d17c841dd62506cf7036ecbbe03d4147f0cd64b352f6c73 |
|
MD5 | 67ca083c49fee8b404dc9d712c59c893 |
|
BLAKE2b-256 | 4e11a34a4023642b9ae537ea9adc4a9b3b6e8de0aca204abbe2a9ef0fb600b37 |
File details
Details for the file idaenv-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: idaenv-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de115d905fdb0c5583570407fe0028156c065299b327a1979378d96184018fe1 |
|
MD5 | ec9ab90f8a0083118e39cbe8d103225c |
|
BLAKE2b-256 | 81f4cd3887d037f20425d3a15eecb9d520c1b1288b47494be34448b63c23fbea |