crytic / ethersplay

EVM dissassembler
GNU Affero General Public License v3.0
838 stars 118 forks source link

Python plugin 'ethersplay' could not be loaded #61

Open ACaiSec opened 1 year ago

ACaiSec commented 1 year ago

System: Windows 10 I try to install ethersplay in Plugin Manager and manual way, but neither works. The error information as follow:

Traceback (most recent call last):
  File "D:\BinaryNinja\BinaryNinja\plugins\python\ethersplay\__init__.py", line 4, in <module>
    from .evm import EVM, EVMView
  File "D:\BinaryNinja\BinaryNinja\plugins\python\ethersplay\evm.py", line 9, in <module>
    from interval3 import Interval, IntervalSet
ModuleNotFoundError: No module named 'interval3'
Python plugin 'ethersplay' could not be loaded
Unable to find plugin crytic_ethersplay

And the interval3 has been installed.

C:\Users\xx>pip install interval3
Requirement already satisfied: interval3 in d:\anaconda\lib\site-packages (2.0.0)

Python version is 3.8.3.

C:\Users\xx>python --version
Python 3.8.3

I am a novice, please advise. Thanks a lot.

ekilmer commented 1 year ago

I was able to reproduce this, but I'm on macOS. The directions should be similar, so you'll need to add the directory where Binary Ninja installed the Python dependencies to the Settings for "Python Virtual Environment Site-Packages".

Watch for the following output in the Log window when installing this plugin from the plugin manager: Screenshot 2022-11-17 at 9 18 21 AM

Note the --target argument and the path where the dependencies are installed

'--target', '/Users/ekilmer/Library/Application Support/Binary Ninja/python310/site-packages', 'pyevmasm', 'interval3', 'evm-cfg-builder>=0.2.0'

You will need to add this path in the Binary Ninja Settings, like so Screenshot 2022-11-17 at 9 17 22 AM

Your Python version will be Python 3.8, and the paths will be different for Windows, but it should be a similar process.

If you still have issues, please post screenshots of what you're seeing, similar to the two pics I posted.