Skip to main content
Glama

execute_script

Execute custom Python scripts within IDA Pro to automate reverse engineering tasks, analyze binary data, and modify the database using IDAPython modules.

Instructions

Execute arbitrary IDAPython code in the IDA environment.

The code has access to all IDA modules (idaapi, ida_funcs, ida_bytes, etc.).
Use 'result' variable to return a value from the script.

WARNING: This is a powerful tool - use with caution as it can modify the database.

Example:
    code = '''
    # Count functions with more than 100 instructions
    count = 0
    for func_ea in idautils.Functions():
        func = ida_funcs.get_func(func_ea)
        if func and func.end_ea - func.start_ea > 100:
            count += 1
    result = f"Found {count} large functions"
    '''

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython code to execute in the IDA environment
timeout_secondsNoMaximum execution time in seconds (default: 30)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icryo/ida-pro-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server