Skip to content

Instantly share code, notes, and snippets.

@widberg
Created June 30, 2024 04:56
Show Gist options
  • Save widberg/23d692b65845f49d54ae254db78e48ff to your computer and use it in GitHub Desktop.
Save widberg/23d692b65845f49d54ae254db78e48ff to your computer and use it in GitHub Desktop.
import ida_bytes
import ida_funcs
import idautils
pat = bytes([0x4D, 0x61, 0x30, 0x57, 0x79, 0x47, 0x31, 0x6B, 0x6D])
for funcea in idautils.Functions():
start = ida_funcs.get_func(funcea).start_ea
end = ida_funcs.get_func(funcea).end_ea
for addr in range(start, end):
if ida_bytes.is_data(ida_bytes.get_flags(addr)):
data = ida_bytes.get_bytes(addr, 14)
if data[:9] == pat:
ida_bytes.set_cmt(addr, "anti-disassembly", 0)
print("Data at " + hex(addr) + " " + str(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment