gaasedelen / lucid

An Interactive Hex-Rays Microcode Explorer
MIT License
548 stars 50 forks source link

Cannot load plugin #1

Closed klefo0 closed 3 years ago

klefo0 commented 3 years ago

Screenshot 2021-01-16 235721 I don't know what wrong happen, can you fix it?

yashomer1994 commented 3 years ago

can't Load Plugin

klefo0 commented 3 years ago

I mean, what wrong when the code exec. I've look into src code but nothing wrong

yashomer1994 commented 3 years ago

I mean, what wrong when the code exec. I've look into src code but nothing wrong

As Per given instructions , copied content to plugin but after restarting IDApro , Error:

Screenshot 2021-01-17 at 4 56 50 PM

Somewhere, it fails to locate the required modules.

klefo0 commented 3 years ago

As the error told it needs sip, I've search in PyQt5 folder, it had all module lucid need

yashomer1994 commented 3 years ago

As the error told it needs sip, I've search in PyQt5 folder, it had all module lucid need

I will check with the same , let you know if issue is resolved or not. Thanks

gaasedelen commented 3 years ago

I mean, what wrong when the code exec. I've look into src code but nothing wrong

As Per given instructions , copied content to plugin but after restarting IDApro , Error:

Screenshot 2021-01-17 at 4 56 50 PM

Somewhere, it fails to locate the required modules.

Lucid is not supported on IDA 7.0. Only IDA Pro 7.5+

Screenshot 2021-01-16 235721 I don't know what wrong happen, can you fix it?

Please run the following in the IDA console:

import idaapi, sys, PyQt5; print(sys.version); print(PyQt5.Qt.PYQT_VERSION_STR); print(PyQt5.__file__); print(idaapi.get_kernel_version(), idaapi.IDA_SDK_VERSION);

And paste the output here so I can help try to diagnose the issue.

If I were to guess, you probably have pip installed another instance of PyQt into your python environment and that one is getting picked up instead of IDA's PyQt libraries.

klefo0 commented 3 years ago

Here what I've got

Python>import idaapi, sys, PyQt5; print(sys.version); print(PyQt5.Qt.PYQT_VERSION_STR); print(PyQt5.__file__); print(idaapi.get_kernel_version(), idaapi.IDA_SDK_VERSION);
3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'PyQt5' has no attribute 'Qt'
gaasedelen commented 3 years ago

I don't think Python 3.9 works properly on IDA 7.5 unless you download and install this update:

https://www.hex-rays.com/blog/python-3-9-support-for-ida-7-5/

Please try that and let me know if it fixes the issue. Otherwise try downgrading to Python 3.6 - 3.8

klefo0 commented 3 years ago

I've tried it, nothing resolved

F:\ReserveEngine\IDA Pro 7.5\plugins\lucid_plugin.py: DLL load failed while importing sip: The specified module could not be found.
Traceback (most recent call last):
  File "F:\ReserveEngine\IDA Pro 7.5\python\3\ida_idaapi.py", line 616, in IDAPython_ExecScript
    exec(code, g)
  File "F:/ReserveEngine/IDA Pro 7.5/plugins/lucid_plugin.py", line 6, in <module>
    import lucid
  File "F:/ReserveEngine/IDA Pro 7.5/plugins\lucid\__init__.py", line 1, in <module>
    from lucid.core import LucidCore
  File "F:/ReserveEngine/IDA Pro 7.5/plugins\lucid\core.py", line 5, in <module>
    from lucid.ui.explorer import MicrocodeExplorer
  File "F:/ReserveEngine/IDA Pro 7.5/plugins\lucid\ui\explorer.py", line 10, in <module>
    from PyQt5 import QtWidgets, QtGui, QtCore, sip
ImportError: DLL load failed while importing sip: The specified module could not be found.
gaasedelen commented 3 years ago

I just tested on 7.5 SP3 with Python 3.9.1 using the instructions in the link above. Lucid seems to load and operate just fine.

I don't think you installed the updated packages in the correct directory, either that or you forgot to run idapyswitch as they say in step 4.

klefo0 commented 3 years ago

I've using idapyswitch before run ida, then that report in output window. I'll try downgrade python

klefo0 commented 3 years ago

I've downgrade python to ver.3.8, now it load, thank @gaasedelen for helping us

Raymoneliu commented 1 year ago

use porcess monitor to view IDA 7.5 open dll,if you don't use idapyswitch to switch python version,ida 7.5 will try to load python38.dll,so you can use idapyswitch.exe(ida install root path) to set python version