diff --git a/plugins/lighthouse/util/disassembler/ida_api.py b/plugins/lighthouse/util/disassembler/ida_api.py index c1644dd..fb458c1 100644 --- a/plugins/lighthouse/util/disassembler/ida_api.py +++ b/plugins/lighthouse/util/disassembler/ida_api.py @@ -226,7 +226,12 @@ def _get_ida_bg_color_from_file(self): # attempt to generate an 'html' dump of the first 0x20 bytes (instructions) ida_fd = idaapi.fopenWT(path) idaapi.gen_file(idaapi.OFILE_LST, ida_fd, imagebase, imagebase+0x20, idaapi.GENFLG_GENHTML) - idaapi.eclose(ida_fd) + # IDA 9.0 removed `eclose`, added `qfclose` in `ida_fpro` + if int(idaapi.get_kernel_version()[0]) >= 9: + import ida_fpro + ida_fpro.qfclose(ida_fd) + else: + idaapi.eclose(ida_fd) # read the dumped text with open(path, "r") as fd: