From 455cfbe8b7aed7cb5be8e1b9aa1917a9f7d51821 Mon Sep 17 00:00:00 2001 From: Ajax Date: Mon, 25 Jan 2016 11:05:29 +0100 Subject: BasicBlocks: update examples with the new API --- example/disasm/file.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'example/disasm/file.py') 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()) -- cgit 1.4.1