Skip to content

Instantly share code, notes, and snippets.

@icecr4ck
icecr4ck / idapython_cheatsheet.md
Last active March 11, 2025 14:17
Cheatsheet for IDAPython
@0xgalz
0xgalz / AutoFunc.py
Last active November 20, 2024 07:23
IDAPython- Change Function Names in IDA According to their corresponding debug prints
import idc
import idautils
import idaapi
FUNCTIONS_REGISTERS = {"g_log": "rcx", "g_log_error": "rdx"}
def get_string_for_function(call_func_addr, register):
"""
:param start_addr: The function call address
@nirizr
nirizr / idapython_get_stack_refs.py
Last active September 1, 2022 20:11
IDAPYTHON: List all references to all stack variables of a function
import idc, idaapi, idautils, ida_xref
def find_stack_members(func_ea):
members = {}
base = None
frame = idc.GetFrame(func_ea)
for frame_member in idautils.StructMembers(frame):
member_offset, member_name, _ = frame_member
members[member_offset] = member_name
if member_name == ' r':
@syndrowm
syndrowm / get_stack_arg.py
Created June 21, 2012 21:26
idapython script to resolv stack variable names
from idaapi import *
from idc import *
def get_stack_arg(arg, base='ebp'):
# find the stack frame
stack = GetFrame(here())
size = GetStrucSize(stack)
# figure out all of the variable names
names = []