about summary refs log tree commit diff stats
path: root/example/disasm/dis_x86_string.py
diff options
context:
space:
mode:
Diffstat (limited to 'example/disasm/dis_x86_string.py')
-rw-r--r--example/disasm/dis_x86_string.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/disasm/dis_x86_string.py b/example/disasm/dis_x86_string.py
index 8f919e4e..175e9264 100644
--- a/example/disasm/dis_x86_string.py
+++ b/example/disasm/dis_x86_string.py
@@ -1,8 +1,9 @@
+from __future__ import print_function
 from miasm2.analysis.binary import Container
 from miasm2.analysis.machine import Machine
 
 # The Container will provide a *bin_stream*, bytes source for the disasm engine
-cont = Container.from_string("\x83\xf8\x10\x74\x07\x89\xc6\x0f\x47\xc3\xeb\x08\x89\xc8\xe8\x31\x33\x22\x11\x40\xc3")
+cont = Container.from_string(b"\x83\xf8\x10\x74\x07\x89\xc6\x0f\x47\xc3\xeb\x08\x89\xc8\xe8\x31\x33\x22\x11\x40\xc3")
 
 # Instantiate a x86 32 bit architecture
 machine = Machine("x86_32")
@@ -16,7 +17,7 @@ asmcfg = mdis.dis_multiblock(0)
 
 # Display each basic blocks
 for block in asmcfg.blocks:
-    print block
+    print(block)
 
 # Output control flow graph in a dot file
 open('str_cfg.dot', 'w').write(asmcfg.dot())