about summary refs log tree commit diff stats
path: root/example/symbol_exec
diff options
context:
space:
mode:
Diffstat (limited to 'example/symbol_exec')
-rw-r--r--example/symbol_exec/depgraph.py2
-rw-r--r--example/symbol_exec/dse_crackme.py2
-rw-r--r--example/symbol_exec/single_instr.py1
3 files changed, 3 insertions, 2 deletions
diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py
index 4d518cb3..c1d6174d 100644
--- a/example/symbol_exec/depgraph.py
+++ b/example/symbol_exec/depgraph.py
@@ -31,7 +31,7 @@ parser.add_argument("--json",
 args = parser.parse_args()
 
 # Get architecture
-with open(args.filename) as fstream:
+with open(args.filename, "rb") as fstream:
     cont = Container.from_stream(fstream)
 
 arch = args.architecture if args.architecture else cont.arch
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)
 
diff --git a/example/symbol_exec/single_instr.py b/example/symbol_exec/single_instr.py
index 263c0252..d65702ba 100644
--- a/example/symbol_exec/single_instr.py
+++ b/example/symbol_exec/single_instr.py
@@ -14,6 +14,7 @@ asm = machine.mn.asm(line)[0]
 # Get back block
 bin_stream = bin_stream_str(asm)
 mdis = machine.dis_engine(bin_stream)
+mdis.lines_wd = 1
 asm_block = mdis.dis_block(START_ADDR)
 
 # Translate ASM -> IR