Skip to content

Commit a8edbe1

Browse files
committed
Support IDA 9.x
1 parent a82abfd commit a8edbe1

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

qiling/extensions/idaplugin/qilingida.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
import ida_hexrays
3939
import ida_range
4040
# PyQt
41-
from PyQt5 import QtCore, QtWidgets
42-
from PyQt5.QtWidgets import (QPushButton, QHBoxLayout)
41+
from PySide6 import QtCore, QtWidgets
42+
from PySide6.QtWidgets import (QPushButton, QHBoxLayout)
4343

4444
# Qiling
4545
from qiling import Qiling
@@ -293,34 +293,29 @@ def get_xrefsfrom(addr, flags=ida_xref.XREF_ALL):
293293
def get_input_file_path():
294294
return ida_nalt.get_input_file_path()
295295

296-
@staticmethod
297-
def get_info_structure():
298-
return ida_idaapi.get_inf_structure()
299-
300296
@staticmethod
301297
def get_main_address():
302-
return IDA.get_info_structure().main
298+
return ida_ida.inf_get_main()
303299

304300
@staticmethod
305301
def get_max_address():
306-
return IDA.get_info_structure().max_ea
302+
return ida_ida.inf_get_max_ea()
307303

308304
@staticmethod
309305
def get_min_address():
310-
return IDA.get_info_structure().min_ea
306+
return ida_ida.inf_get_min_ea()
311307

312308
@staticmethod
313309
def is_big_endian():
314-
return IDA.get_info_structure().is_be()
310+
return ida_ida.inf_is_be()
315311

316312
@staticmethod
317313
def is_little_endian():
318314
return not IDA.is_big_endian()
319315

320316
@staticmethod
321317
def get_filetype():
322-
info = IDA.get_info_structure()
323-
ftype = info.filetype
318+
ftype = ida_ida.inf_get_filetype()
324319
if ftype == ida_ida.f_MACHO:
325320
return "macho"
326321
elif ftype == ida_ida.f_PE or ftype == ida_ida.f_EXE or ftype == ida_ida.f_EXE_old: # is this correct?
@@ -332,18 +327,17 @@ def get_filetype():
332327

333328
@staticmethod
334329
def get_ql_arch_string():
335-
info = IDA.get_info_structure()
336-
proc = info.procname.lower()
330+
proc = ida_ida.inf_get_procname().lower()
337331
result = None
338332
if proc == "metapc":
339333
result = "x86"
340-
if info.is_64bit():
334+
if ida_ida.inf_is_64bit():
341335
result = "x8664"
342336
elif "mips" in proc:
343337
result = "mips"
344338
elif "arm" in proc:
345339
result = "arm32"
346-
if info.is_64bit():
340+
if ida_ida.inf_is_64bit():
347341
result = "arm64"
348342
# That's all we support :(
349343
return result
@@ -1006,7 +1000,7 @@ def __init__(self):
10061000
def init(self):
10071001
# init data
10081002
logging.info('---------------------------------------------------------------------------------------')
1009-
logging.info('Qiling Emulator Plugin For IDA, by Qiling Team. Version {0}, 2020'.format(QLVERSION))
1003+
logging.info('Qiling Emulator Plugin For IDA, by Qiling Team. Version {0}, 2025'.format(QLVERSION))
10101004
logging.info('Based on Qiling v{0}'.format(QLVERSION))
10111005
logging.info('Find more information about Qiling at https://qiling.io')
10121006
logging.info('---------------------------------------------------------------------------------------')

0 commit comments

Comments
 (0)