Closed pedrib closed 8 years ago
merged, thanks!
in the later part of this PR, we copy shared library of Keystone, like this:
$ sudo mkdir -p /opt/IDAPro6.4/python/lib/python2.7/dist-packages/keystone/
$ sudo cp build/llvm/lib/libkeystone.so.* /opt/IDAPro6.4/python/lib/python2.7/dist-packages/keystone/
but i think this can be more simple by just copying to /opt/IDAPro6.4/python/keystone/
, like:
$ sudo cp build/llvm/lib/libkeystone.so.* /opt/IDAPro6.4/python/keystone/
can you confirm this works?
@aquynh you're right, it works like that!
Sent updated PR #18
another question: do we really want this line? why distutils
is needed here?
$ sudo cp -r /usr/lib/python2.7/distutils /opt/IDAPro6.8/python/
I don't know, but without that it won't work... I guess IDA's python doesn't have that package and it's needed?
This is the output:
Loading processor module /home/user/stuff/ida/6.95/procs/pc.ilx for metapc...OK
keypatch.py: No module named distutils.sysconfig
Traceback (most recent call last):
File "/home/user/stuff/ida/6.95/python/ida_idaapi.py", line 509, in IDAPython_ExecScript
execfile(script, g)
File "/home/user/stuff/ida/6.95/plugins/keypatch.py", line 23, in
Loading type libraries...
Autoanalysis subsystem has been initialized.
loadImportTable: storage::loadExternSegData() failed
RpcThreadWorker::RpcThreadWorker(QT::QObject)
Database for file 'server.exe' has been loaded.
Compiling file '/home/user/stuff/ida/6.95/idc/ida.idc'...
Executing function 'main'...
keypatch.py: cannot import name arm_const
Traceback (most recent call last):
File "/home/user/stuff/ida/6.95/python/ida_idaapi.py", line 509, in IDAPython_ExecScript
execfile(script, g)
File "/home/user/stuff/ida/6.95/plugins/keypatch.py", line 23, in
could you please do me a favour: if you comment out this line in your keystone.py at https://github.com/keystone-engine/keystone/blob/master/bindings/python/keystone/keystone.py#L15, then remove your /opt/IDAPro6.8/python/distutils/, does Keypatch still load & work for you?
@aquynh it works! I've removed the directory, commented the line and all seems to work fine.
Thanks for your confirmation. I will make some changes in the next version of Keystone, so distutils is no longer required for Keypatch.
next version of Keystone will have this https://github.com/keystone-engine/keystone/commit/f7f71f6318812aac64b8c6210537b179c0218232, so you dont need to copy distutils just for Keypatch.
Thanks, I've changed that on my end while the new version doesn't come out.
As discussed in issue #4