keystone-engine / keypatch

Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.
http://www.keystone-engine.org/keypatch
GNU General Public License v2.0
1.47k stars 355 forks source link

ERROR: fail to load the dynamic library using ida pro 7 - win10 #46

Closed karpiyon closed 6 years ago

karpiyon commented 6 years ago

I followed all the solution i could find for this. in short, after running: keystone-0.9.1-python-win32.msi I copied the entire c:\Python27\Lib\site-packages\keystone\ to c:\Program Files\IDA 7.0\python\keystone\

copied keypatch.py (v2.1) to c:\Program Files\IDA 7.0\plugins\

python27 in in my $PATH I still get errors. Any ideas what i can do?

I also verified i have VC++ (2017) x86 installed

_C:\Program Files\IDA 7.0\plugins\keypatch.py: ERROR: fail to load the dynamic library. Traceback (most recent call last): File "C:\Program Files\IDA 7.0\python\ida_idaapi.py", line 553, in IDAPython_ExecScript execfile(script, g) File "C:/Program Files/IDA 7.0/plugins/keypatch.py", line 23, in from keystone import * File "C:\Program Files\IDA 7.0\python\keystone__init.py", line 4, in from .keystone import Ks, ks_version, ks_arch_supported, version_bind, debug, KsError, version__ File "C:\Program Files\IDA 7.0\python\keystone\keystone.py", line 74, in raise ImportError("ERROR: fail to load the dynamic library.") ImportError: ERROR: fail to load the dynamic library.

Database for file 'DaPainter.exe' has been loaded. Hex-Rays Decompiler plugin has been loaded (v7.0.0.170914) License: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX The hotkeys are F5: decompile, Ctrl-F5: decompile all. Please check the Edit/Plugins menu for more informaton. IDAPython Hex-Rays bindings initialized. C:\Program Files\IDA 7.0\plugins\keypatch.py: cannot import name arm_const Traceback (most recent call last): File "C:\Program Files\IDA 7.0\python\ida_idaapi.py", line 553, in IDAPython_ExecScript execfile(script, g) File "C:/Program Files/IDA 7.0/plugins/keypatch.py", line 23, in from keystone import * File "C:\Program Files\IDA 7.0\python\keystone__init__.py", line 2, in from . import arm_const, arm64_const, mips_const, sparc_const, hexagon_const, systemz_const, ppc_const, x86_const ImportError: cannot import name armconst

fjh658 commented 6 years ago

Firstly install python64, and install keystone-0.9.1-python-win64.msi

karpiyon commented 6 years ago

thank you. I guess they need to update the installation instruction. The specifically write to use the 32 bit version regardless of IDA version.