about summary refs log tree commit diff stats
path: root/example/symbol_exec/dse_crackme.py
diff options
context:
space:
mode:
authorw4kfu <gw4kfu@gmail.com>2017-06-22 14:01:40 -0400
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-01-16 12:56:14 +0100
commitd147d92892b294b31f1703685a3cf67b80cadb94 (patch)
treeccfce65718aa802f8e240a9dbbdf89b9b6a9518b /example/symbol_exec/dse_crackme.py
parent3e2364edcb6c4259782e251c236bad1090c8c9e0 (diff)
downloadmiasm-d147d92892b294b31f1703685a3cf67b80cadb94.tar.gz
miasm-d147d92892b294b31f1703685a3cf67b80cadb94.zip
append b to the opens mode ; Python on Windows makes a distinction between text and binary files
Diffstat (limited to 'example/symbol_exec/dse_crackme.py')
-rw-r--r--example/symbol_exec/dse_crackme.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/symbol_exec/dse_crackme.py b/example/symbol_exec/dse_crackme.py
index 9ac4d6d1..303447a4 100644
--- a/example/symbol_exec/dse_crackme.py
+++ b/example/symbol_exec/dse_crackme.py
@@ -31,7 +31,7 @@ def xxx_fopen(jitter):
     global my_FILE_ptr
     ret_addr, args = jitter.func_args_systemv(['path', 'mode'])
     fname = jitter.get_str_ansi(args.path)
-    FILE_to_info[my_FILE_ptr] = FInfo(fname, open(fname))
+    FILE_to_info[my_FILE_ptr] = FInfo(fname, open(fname, "rb"))
     my_FILE_ptr += 1
     return jitter.func_ret_stdcall(ret_addr, my_FILE_ptr - 1)