Files
reverse-skills-max/vendor-new/analyst-ai-pack/skills/scripting-ida-with-idapython/references/api-reference.md

1.4 KiB

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

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