gaasedelen / patching

An Interactive Binary Patching Plugin for IDA Pro
MIT License
872 stars 113 forks source link

Added support for ida9.0 beta #21

Closed kanren3 closed 3 months ago

kanren3 commented 3 months ago

IDA 8.x does not support get_type_by_tid, and IDA 9.0 does not support ida_struct. I don't know of a way to support both simultaneously.

QiuChenly commented 3 months ago

File : core.py line 185, the api changed cause ida can not compare arm to "ARM".

latest 9.0, the arm be changed to "ARM". this patch fix arm64 machine ASM not work.

        arch_name = ida_ida.inf_get_procname()
        print(f"当前加载的CPU类型为: {arch_name}")

        if arch_name == "metapc":
            assembler = AsmX86()
        elif arch_name.startswith("arm") or arch_name.startswith("ARM"):
            assembler = AsmARM()
kanren3 commented 3 months ago

File : core.py line 185, the api changed cause ida can not compare arm to "ARM".

latest 9.0, the arm be changed to "ARM". this patch fix arm64 machine ASM not work.

        arch_name = ida_ida.inf_get_procname()
        print(f"当前加载的CPU类型为: {arch_name}")

        if arch_name == "metapc":
            assembler = AsmX86()
        elif arch_name.startswith("arm") or arch_name.startswith("ARM"):
            assembler = AsmARM()

Thank you, I didn't notice that.

zhefox commented 3 months ago

image change line 665 in asm.py to if ida_ida.inf_is_be():

kanren3 commented 3 months ago

image change line 665 in asm.py to if ida_ida.inf_is_be():

Thank you for reminding me. In these two modifications, I replaced ida_struct and ida_typeinf with idc to ensure compatibility from version 7.6 to 9.0 beta.

gaasedelen commented 3 months ago

Thanks!