diff options
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | example/disasm/file.py | 4 | ||||
| -rw-r--r-- | example/ida/ctype_propagation.py | 1 |
3 files changed, 5 insertions, 6 deletions
diff --git a/README.md b/README.md index 118051df..570bee22 100644 --- a/README.md +++ b/README.md @@ -165,8 +165,8 @@ Disassembling the shellcode at address `0`: >>> from miasm2.analysis.machine import Machine >>> machine = Machine('x86_32') >>> mdis = machine.dis_engine(c.bin_stream) ->>> blocks = mdis.dis_multiblock(0) ->>> for block in blocks: +>>> asmcfg = mdis.dis_multiblock(0) +>>> for block in asmcfg.blocks: ... print block ... loc_0000000000000000:0x00000000 @@ -269,7 +269,7 @@ Initializing the IR pool: ``` >>> ira = machine.ira() ->>> for block in blocks: +>>> for block in asmcfg.blocks: ... ira.add_block(block) ... ``` diff --git a/example/disasm/file.py b/example/disasm/file.py index 88ba6162..196e1b1a 100644 --- a/example/disasm/file.py +++ b/example/disasm/file.py @@ -13,6 +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 -blocks = mdis.dis_multiblock(addr) +asmcfg = mdis.dis_multiblock(addr) -open('graph.dot', 'w').write(blocks.dot()) +open('graph.dot', 'w').write(asmcfg.dot()) diff --git a/example/ida/ctype_propagation.py b/example/ida/ctype_propagation.py index d35835dc..db324833 100644 --- a/example/ida/ctype_propagation.py +++ b/example/ida/ctype_propagation.py @@ -268,7 +268,6 @@ def analyse_function(): iraCallStackFixer = get_ira_call_fixer(ira) ir_arch = iraCallStackFixer(mdis.symbol_pool) - asmcfg = mdis.dis_multiblock(addr) # Generate IR for block in asmcfg.blocks: |