Permalink
Browse files

Python bindings (@noword - issue #13)

  • Loading branch information...
1 parent 3885286 commit 61debd84a318c5bd79555cec93bc1d565413b05d @Nukem9 Nukem9 committed Apr 13, 2015
Showing with 26 additions and 0 deletions.
  1. +26 −0 bindings/XEDParsePython.py
@@ -0,0 +1,26 @@
+from ctypes import *
+
+XEDPARSE_MAXBUFSIZE = 256
+XEDPARSE_MAXASMSIZE = 16
+
+XEDPARSE_ERROR = 0
+XEDPARSE_OK = 1
+
+class XEDPARSE(Structure):
+ _pack_= 8
+ _fields_ = [("x64", c_bool),
+ ("cip", c_ulonglong),
+ ("dest_size", c_uint),
+ ("cbUnknown", c_void_p),
+ ("dest", c_char * XEDPARSE_MAXASMSIZE),
+ ("instr", c_char * XEDPARSE_MAXBUFSIZE),
+ ("error", c_char * XEDPARSE_MAXBUFSIZE)
+ ]
+
+import os
+if os.name == 'nt':
+ __module = CDLL('XEDParse')
+elif os.name == 'posix':
+ __module = CDLL('libXEDParse.so')
+
+XEDParseAssemble = __module.XEDParseAssemble

0 comments on commit 61debd8

Please sign in to comment.