joxeankoret / pyew

Official repository for Pyew.
GNU General Public License v2.0
383 stars 95 forks source link

diStorm3 Compatible #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
for those who need it

ex :
on linux 64bit

/path/to/distorm3/make/linux % make 
sudo mv libdistorm3.so /usr/lib64

patch :

diff --git a/pydistorm.py b/pydistorm.py
--- a/pydistorm.py
+++ b/pydistorm.py
@@ -32,11 +32,11 @@

 osVer = platform.system()
 if osVer == "Windows":
-    LIB_FILENAME = "distorm64.dll"
+    LIB_FILENAME = "distorm3.dll"
 else:
-    LIB_FILENAME = 'libdistorm64.so'
+    LIB_FILENAME = 'libdistorm3.so'

-distorm = cdll.LoadLibrary(LIB_FILENAME)
+distorm3 = cdll.LoadLibrary(LIB_FILENAME)
 Decode16Bits = 0
 Decode32Bits = 1
 Decode64Bits = 2
@@ -44,11 +44,11 @@

 if osVer == "Windows":
     if SUPPORT_64BIT_OFFSET:
-        decode_func = distorm.distorm_decode64
+        decode_func = distorm3.distorm_decode64
     else:
-        decode_func = distorm.distorm_decode32
+        decode_func = distorm3.distorm_decode32
 else:
-    decode_func = distorm.internal_decode
+    decode_func = distorm3.distorm_decode64

 DECRES_NONE = 0
 DECRES_SUCCESS = 1

Original issue reported on code.google.com by egeektro...@gmail.com on 24 Sep 2012 at 12:45

GoogleCodeExporter commented 9 years ago
If I'm not wrong, with the latest changes (not yours) it works with diStorm 
version 3. Could you check it @egeektronic, please? It Works For Me (TM).

Original comment by joxean.p...@gmail.com on 7 May 2013 at 1:34

GoogleCodeExporter commented 9 years ago

Original comment by joxean.p...@gmail.com on 17 May 2013 at 7:39