about summary refs log tree commit diff stats
path: root/example/symbol_exec/single_instr.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-12-07 22:44:44 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-12-10 11:10:45 +0100
commit5e620f04a458a7ff3fb72673f887c9423a40c1aa (patch)
tree2dd12a15c7f3a038471e566d4a971b5934084a17 /example/symbol_exec/single_instr.py
parentcc722f808ec76a3edeb6503d3a8ada975ef0a3d5 (diff)
downloadmiasm-5e620f04a458a7ff3fb72673f887c9423a40c1aa.tar.gz
miasm-5e620f04a458a7ff3fb72673f887c9423a40c1aa.zip
Updt example api
Diffstat (limited to 'example/symbol_exec/single_instr.py')
-rw-r--r--example/symbol_exec/single_instr.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/example/symbol_exec/single_instr.py b/example/symbol_exec/single_instr.py
index c78f1f7f..2de2a72e 100644
--- a/example/symbol_exec/single_instr.py
+++ b/example/symbol_exec/single_instr.py
@@ -1,7 +1,7 @@
 # Minimalist Symbol Exec example
-from miasm2.core.bin_stream import bin_stream_str
-from miasm2.ir.symbexec import SymbolicExecutionEngine
+from miasm2.analysis.binary import Container
 from miasm2.analysis.machine import Machine
+from miasm2.ir.symbexec import SymbolicExecutionEngine
 from miasm2.core.locationdb import LocationDB
 
 START_ADDR = 0
@@ -14,8 +14,8 @@ line = machine.mn.fromstring("MOV EAX, EBX", loc_db, 32)
 asm = machine.mn.asm(line)[0]
 
 # Get back block
-bin_stream = bin_stream_str(asm)
-mdis = machine.dis_engine(bin_stream, loc_db=loc_db)
+cont = Container.from_string(asm, loc_db = loc_db)
+mdis = machine.dis_engine(cont.bin_stream, loc_db=loc_db)
 mdis.lines_wd = 1
 asm_block = mdis.dis_block(START_ADDR)