This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import idc | |
import idautils | |
import ida_xref | |
# iterate over all objc_msgSend code references | |
objc_msgSend = idc.get_name_ea_simple('_objc_msgSend') | |
for xref in idautils.XrefsTo(objc_msgSend): | |
if xref.type & ida_xref.XREF_DATA: | |
continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from pathlib import Path | |
MH_MAGIC_64 = b'\xcf\xfa\xed\xfe' | |
CPU_TYPE_ARM64 = b'\x0c\x00\x00\x01' | |
CPU_SUBTYPE_IOS13 = b'\x02\x00\x00\x00' | |
CPU_SUBTYPE_IOS14 = b'\x02\x00\x00\x80' | |
IOS13_HEADER = MH_MAGIC_64 + CPU_TYPE_ARM64 + CPU_SUBTYPE_IOS13 | |
IOS14_HEADER = MH_MAGIC_64 + CPU_TYPE_ARM64 + CPU_SUBTYPE_IOS14 |