diff options
| author | Camille Mougey <commial@gmail.com> | 2018-06-20 17:32:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-20 17:32:30 +0200 |
| commit | 8a2c80d3381a913235948a42625162fd11e97a46 (patch) | |
| tree | 644544ae3cb356af99f8dc4976b21b008d6c5028 | |
| parent | 0adddb12a7410c4bbdd6ee79252e9bf05ca22818 (diff) | |
| parent | 3b339448178ba2ff41bda606829deacc21df7198 (diff) | |
| download | miasm-8a2c80d3381a913235948a42625162fd11e97a46.tar.gz miasm-8a2c80d3381a913235948a42625162fd11e97a46.zip | |
Merge pull request #771 from serpilliere/fix_asmcfg_name
All: fix var name to reflect object types
| -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: |