about summary refs log tree commit diff stats
path: root/example/jitter
diff options
context:
space:
mode:
Diffstat (limited to 'example/jitter')
-rwxr-xr-xexample/jitter/msp430.py2
-rw-r--r--example/jitter/sandbox_call.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/example/jitter/msp430.py b/example/jitter/msp430.py
index b69f91c6..6dd67542 100755
--- a/example/jitter/msp430.py
+++ b/example/jitter/msp430.py
@@ -40,7 +40,7 @@ def jit_msp430_binary(args):
     myjit.jit.log_mn = args.log_mn
     myjit.jit.log_newbloc = args.log_newbloc
 
-    myjit.vm.add_memory_page(0, PAGE_READ | PAGE_WRITE, open(filepath).read())
+    myjit.vm.add_memory_page(0, PAGE_READ | PAGE_WRITE, open(filepath, "rb").read())
     myjit.add_breakpoint(0x1337, lambda _: exit(0))
 
 
diff --git a/example/jitter/sandbox_call.py b/example/jitter/sandbox_call.py
index 49365004..dc64af15 100644
--- a/example/jitter/sandbox_call.py
+++ b/example/jitter/sandbox_call.py
@@ -13,7 +13,7 @@ options = parser.parse_args()
 
 sb = Sandbox_Linux_arml(options.filename, options, globals())
 
-with open(options.filename) as fdesc:
+with open(options.filename, "rb") as fdesc:
     cont = Container.from_stream(fdesc)
     addr_to_call = cont.symbol_pool.getby_name("md5_starts").offset