A Qt-based multiprocessing framework for IDA Pro parallel computing with simple decorator API
Project description
ida-taskr
Overview
IDA Taskr is a pure Python library for IDA Pro parallel computing. It lets you use the power of Qt (built-in to IDA!) and Python's multiprocessing to offload computationally intensive tasks to worker processes without freezing IDA Pro's UI.
Key Features:
- 🚀 Simple decorator API - just add
@cpu_taskto run in background - 🔄 Process-based parallelism for true multi-core execution
- 📦 Shared memory support for large binary data
- 🎯 Qt signal integration for progress callbacks
- ⚡ Compatible with IDA Pro 9.1 (PyQt5) and 9.2+ (PySide6)
Installation
Option 1: Single file (no install needed)
Download ida_taskr_amalgamated.py and drop into IDA's plugins folder. That's it - one file, zero dependencies!
Option 2: pip install
pip install ida-taskr
# Or from source with Qt support
pip install -e .[pyqt5] # For IDA Pro 9.1
pip install -e .[pyside6] # For IDA Pro 9.2+
Option 3: IDA Plugin Manager (HCLI)
Download ida-taskr-{version}.zip and install via HCLI.
Quick Start
The Simplest Way: @cpu_task
Add one decorator and your function runs in the background:
from ida_taskr import cpu_task
@cpu_task
def analyze_binary(data):
"""This runs in a background thread - UI stays responsive!"""
result = []
for byte in data:
result.append(process_byte(byte))
return result
# Usage - returns immediately!
future = analyze_binary(binary_data)
# Do other work while it runs...
# Get result when needed
result = future.result()
That's it. One line. Your function now runs without blocking IDA.
With Callbacks
Get notified when your task completes:
from ida_taskr import cpu_task
@cpu_task(on_complete=lambda r: print(f"Done! Found {len(r)} patterns"))
def find_patterns(data):
return scan_for_patterns(data)
# Fire and forget - callback handles the result
find_patterns(binary_data)
Parallel Processing
Process multiple items across worker threads:
from ida_taskr import parallel
@parallel(max_workers=8)
def analyze_function(func_ea):
"""Analyze a single function."""
return get_function_signature(func_ea)
# Process 100 functions in parallel
function_addresses = list(idautils.Functions())
futures = [analyze_function(addr) for addr in function_addresses]
results = [f.result() for f in futures]
Large Data with Shared Memory
For large binary blobs (megabytes), use shared memory to avoid copying:
from ida_taskr import shared_memory_task
@shared_memory_task(num_chunks=8)
def find_signatures(chunk_data, chunk_id, total_chunks):
"""
Process one chunk of the binary.
chunk_data: memoryview of this chunk (zero-copy!)
chunk_id: which chunk this is (0-7)
total_chunks: total number of chunks (8)
"""
signatures = []
for i in range(len(chunk_data) - 16):
if is_interesting_pattern(chunk_data[i:i+16]):
signatures.append(bytes(chunk_data[i:i+16]))
return signatures
# ida-taskr handles all shared memory complexity!
binary_data = ida_bytes.get_bytes(start_ea, size) # e.g., 8MB
all_signatures = find_signatures(binary_data) # Returns list of 8 results
Decorator Reference
| Decorator | Use Case | Example |
|---|---|---|
@cpu_task |
CPU-intensive work | Pattern scanning, signature generation |
@io_task |
I/O-bound work | Network requests, file operations |
@parallel(n) |
Multiple parallel tasks | Batch function analysis |
@background_task |
Full control with callbacks | Progress reporting |
@shared_memory_task |
Large data processing | Multi-MB binary analysis |
@background_task - Full Control
from ida_taskr import background_task
@background_task(
max_workers=4,
on_complete=lambda r: print(f"Result: {r}"),
on_error=lambda e: print(f"Error: {e}"),
on_progress=lambda p, m: print(f"[{p}%] {m}"),
executor_type='process' # 'thread' or 'process'
)
def heavy_analysis(data, progress_callback=None):
for i, chunk in enumerate(chunks(data, 100)):
process(chunk)
if progress_callback:
progress_callback(i * 10, f"Processed chunk {i}")
return "done"
Advanced Usage
Direct Executor Access
For more control, use the executors directly:
from ida_taskr import ProcessPoolExecutor, ThreadExecutor
# Process-based (true parallelism, bypasses GIL)
with ProcessPoolExecutor(max_workers=4) as executor:
futures = [executor.submit(cpu_task, arg) for arg in args]
results = [f.result() for f in futures]
# Thread-based (good for IDA SDK calls that release GIL)
with ThreadExecutor(max_workers=8) as executor:
futures = [executor.submit(analyze_func, ea) for ea in function_list]
results = [f.result() for f in futures]
Worker Scripts (Bidirectional IPC)
For complex scenarios requiring persistent workers and bidirectional communication. Use this when you need:
- Long-running worker processes that stay alive between tasks
- Custom message protocols between IDA and workers
- Streaming results back to IDA as work progresses
- Worker state that persists across multiple commands
from ida_taskr import TaskRunner
runner = TaskRunner(
worker_script="path/to/worker.py",
worker_args=["arg1", "arg2"]
)
@runner.on('worker_results')
def handle_results(results):
print(f"Results: {results}")
@runner.on('worker_message')
def handle_progress(msg):
print(f"Progress: {msg}")
runner.start()
runner.send_command({"command": "process", "data": [1, 2, 3]})
# Worker stays alive, can send more commands...
runner.send_command({"command": "analyze", "target": 0x401000})
runner.stop()
See examples/ for more detailed examples including:
- Ultra minimal example - Smallest possible code
- Shared memory patterns - Large data processing
- Signature generation - Real IDA use case
- QtAsyncio integration - Async/await support
Testing
# Run all unit tests
./run_tests.sh
# Run Qt integration tests
pytest tests/integration/test_integration_qt_core.py -v
# Run with coverage
pytest tests/ --cov=src/ida_taskr --cov-report=html
Supported Configurations:
- ✅ Python 3.11, 3.12, 3.13
- ✅ PyQt5 (IDA Pro 9.1)
- ✅ PySide6 (IDA Pro 9.2+)
Documentation
- QtAsyncio Integration - Async/await and event loop details
- IDA Testing Guide - Running tests inside IDA Pro
- Examples README - Comprehensive examples guide
Contributing 🤝
We welcome contributions! See the examples and tests for code style.
- Fork the repository
- Create a feature branch
- Run tests:
./run_tests.sh - Submit a pull request
License 📜
MIT License - see LICENSE for details.
Contact 📧
Questions or issues? Open a GitHub issue or reach out to @mahmoudimus.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ida_taskr-1.0.1.tar.gz.
File metadata
- Download URL: ida_taskr-1.0.1.tar.gz
- Upload date:
- Size: 40.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b5d5f7713a603f4469f0703c3cf45a9c96644f6ef7fac1216e9b96f18d0fcd3
|
|
| MD5 |
140cb877c5728fecccc52aa591bdb9f1
|
|
| BLAKE2b-256 |
41f402925e2f2ced17b71c4cbce70771bbf80ba885929fefbe5ccbab3e700462
|
Provenance
The following attestation bundles were made for ida_taskr-1.0.1.tar.gz:
Publisher:
release.yml on mahmoudimus/ida-taskr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ida_taskr-1.0.1.tar.gz -
Subject digest:
9b5d5f7713a603f4469f0703c3cf45a9c96644f6ef7fac1216e9b96f18d0fcd3 - Sigstore transparency entry: 907337771
- Sigstore integration time:
-
Permalink:
mahmoudimus/ida-taskr@82bf50b71c3cdb3520be19c73696140b102e3d65 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/mahmoudimus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@82bf50b71c3cdb3520be19c73696140b102e3d65 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ida_taskr-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ida_taskr-1.0.1-py3-none-any.whl
- Upload date:
- Size: 40.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba24d8b401f075b0d55063e7094e11658391a06d4699b3952ce79a1514ce6f52
|
|
| MD5 |
697700fbd6f603b625f16630f5f090ff
|
|
| BLAKE2b-256 |
f10632e5a049864aaeb0ad85c7f04767cd5c216b273bc2424e561939cc8f6397
|
Provenance
The following attestation bundles were made for ida_taskr-1.0.1-py3-none-any.whl:
Publisher:
release.yml on mahmoudimus/ida-taskr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ida_taskr-1.0.1-py3-none-any.whl -
Subject digest:
ba24d8b401f075b0d55063e7094e11658391a06d4699b3952ce79a1514ce6f52 - Sigstore transparency entry: 907337785
- Sigstore integration time:
-
Permalink:
mahmoudimus/ida-taskr@82bf50b71c3cdb3520be19c73696140b102e3d65 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/mahmoudimus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@82bf50b71c3cdb3520be19c73696140b102e3d65 -
Trigger Event:
push
-
Statement type: