Skip to content

meltedinhex/analyst-ai-pack / skills/scripting-ida-with-idapython

scripting-ida-with-idapython

Verified

Automates IDA Pro analysis with IDAPython by generating scripts that enumerate functions, decode strings, rename by signature, and export analysis results, and by documenting the headless idat batch invocation. Activates for requests to script IDA Pro, write IDAPython automation, or run IDA in batch/headless mode.

FileKindSize
LICENSEother340 B
SKILL.mdskill md2.7 KB
references/api-reference.mdmarkdown1.4 KB
scripts/analyst.pyscript2.7 KB

references/api-reference.md

View on GitHub
# API Reference: Scripting IDA Pro With IDAPython

## Overview

`scripts/analyst.py` generates an IDAPython analysis script (enumerate functions/strings → JSON)
and the headless `idat` batch command to run it. It only generates text — it does not run IDA or
any sample.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | shlex, JSON, file IO |
| IDA Pro + IDAPython | 7.x/9.x | runs the generated script (separately) |

## Core functions

### `script(out, emit)`
Writes an IDAPython script using `idautils.Functions`, `idc.get_func_name`, `idautils.Strings`,
and `ida_auto.auto_wait()`, exiting via `ida_pro.qexit`.

### `batch(script_path, input_path)`
Builds `idat -A -S"<script>" <input>` (autonomous mode, run script).

## Key IDA batch flags

- `-A` — autonomous/auto mode (no dialogs).
- `-S<script>` — run the script after load.
- `-L<file>` — log output. Use `idat64` for 64-bit inputs.

## Usage

```bash
python scripts/analyst.py script --emit functions,strings --out ida_export.py
python scripts/analyst.py batch --script ida_export.py --input sample.exe
```

## Sources

- Hex-Rays IDAPython API docs — https://hex-rays.com/products/ida/support/idapython_docs/
- IDA batch/headless `idat -A -S` usage from Hex-Rays documentation
- `idautils.Functions`/`Strings` and `ida_auto.auto_wait` from the IDAPython API
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 193kUpdated Claude CodeCodexVerifiedInstall