about summary refs log tree commit diff stats
path: root/example/disasm/file.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2016-01-25 11:05:29 +0100
committerAjax <commial@gmail.com>2016-01-26 17:09:18 +0100
commit455cfbe8b7aed7cb5be8e1b9aa1917a9f7d51821 (patch)
tree58c354de7afe7b4b0ca6af923616941ba9c2e79e /example/disasm/file.py
parent01b1f292c84d4cbda38b6c308fc7b1af52595cec (diff)
downloadmiasm-455cfbe8b7aed7cb5be8e1b9aa1917a9f7d51821.tar.gz
miasm-455cfbe8b7aed7cb5be8e1b9aa1917a9f7d51821.zip
BasicBlocks: update examples with the new API
Diffstat (limited to 'example/disasm/file.py')
-rw-r--r--example/disasm/file.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/example/disasm/file.py b/example/disasm/file.py
index 1b9347d8..db5cd96b 100644
--- a/example/disasm/file.py
+++ b/example/disasm/file.py
@@ -1,6 +1,5 @@
 import sys
 from miasm2.arch.x86.disasm import dis_x86_32
-from miasm2.core.asmbloc import bloc2graph
 from miasm2.analysis.binary import Container
 from pdb import pm
 
@@ -14,7 +13,6 @@ cont = Container.from_stream(open(sys.argv[1]))
 mdis = dis_x86_32(cont.bin_stream)
 # Inform the engine to avoid disassembling null instructions
 mdis.dont_dis_nulstart_bloc = True
-blocs = mdis.dis_multibloc(addr)
+blocks = mdis.dis_multibloc(addr)
 
-graph = bloc2graph(blocs)
-open('graph.dot', 'w').write(graph)
+open('graph.dot', 'w').write(blocks.dot())