Execute a Python file in the worker
py_exec_fileExecute a Python script file in IDA and return stdout/stderr, using one shared globals dict so top-level definitions are visible to all code in large scripts.
Instructions
Execute a Python script file in IDA context and return stdout/stderr.
Unlike py_eval, this runs the entire file with exec() using a single shared globals dict (no locals split), so top-level definitions are visible to all code in the script. Handles large scripts that would be unwieldy as inline code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to a Python script to execute | |
| 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 |