execute_python
Run Python code against the currently open IDA database, returning the expression result along with captured stdout and stderr.
Instructions
Execute Python and return its result plus captured stdout and stderr.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code that runs against an already-open database. Call reference(query) first; do not guess the API shape. `db` is the current ida-domain Database, and `ida_domain` is also imported globally. Imports, variables, and definitions persist for this agent's database lease. A single or trailing expression is returned. For function-style code, define run(db), execute(db), or main(db); it is invoked automatically when there is no trailing expression. | |
| timeout | No | Python execution timeout in seconds. This does not include the separate initial autoanalysis wait. | |
| instance_id | No | Optional database instance id. If omitted, use the current target. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | ||
| stderr | Yes | ||
| stdout | Yes |