about summary refs log tree commit diff stats
path: root/example
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2011-10-03 08:55:48 +0200
committerserpilliere <devnull@localhost>2011-10-03 08:55:48 +0200
commit0eae576c12e0a20a49466ce4e934e156f036c5d5 (patch)
treee52bff41f4a0254b093d362be590b3d5a2b7d9f2 /example
parenta5a1553ee09c0bd67cd97315921ff824525eee22 (diff)
downloadmiasm-0eae576c12e0a20a49466ce4e934e156f036c5d5.tar.gz
miasm-0eae576c12e0a20a49466ce4e934e156f036c5d5.zip
fix win_api set str ansi/unicode
Diffstat (limited to 'example')
-rw-r--r--example/unpack_upx.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/unpack_upx.py b/example/unpack_upx.py
index e7ea4b77..4d66be58 100644
--- a/example/unpack_upx.py
+++ b/example/unpack_upx.py
@@ -156,7 +156,8 @@ from miasm.tools import win_api
 dyn_func = {}

 dyn_func[dll_dyn_funcs['kernel32_LoadLibraryA']] = myloadlibexa

 dyn_func[dll_dyn_funcs['kernel32_GetProcAddress']] = mygetproc

-dyn_func[dll_dyn_funcs['kernel32_VirtualProtect']] = win_api.kernel32_VirtualProtect

+if 'kernel32_VirtualProtect' in dll_dyn_funcs:

+    dyn_func[dll_dyn_funcs['kernel32_VirtualProtect']] = win_api.kernel32_VirtualProtect