diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2016-01-26 17:45:24 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2016-01-26 17:45:24 +0100 |
| commit | c1bc56754495e1c2a4176aaa486de9e58cb02a88 (patch) | |
| tree | 1ca51aab9e0908e3f11b0cccc7ad7f50be349f67 /example/disasm/function.py | |
| parent | b3fae7887d63bcdbb18b25ade6d20f152d802005 (diff) | |
| parent | d6222c4383891c6706ce70ec7750b42ee24e1cfc (diff) | |
| download | miasm-c1bc56754495e1c2a4176aaa486de9e58cb02a88.tar.gz miasm-c1bc56754495e1c2a4176aaa486de9e58cb02a88.zip | |
Merge pull request #309 from commial/feature-basicblocks
Feature AsmCFG
Diffstat (limited to '')
| -rw-r--r-- | example/disasm/function.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/example/disasm/function.py b/example/disasm/function.py index a1a9b393..1fe1754f 100644 --- a/example/disasm/function.py +++ b/example/disasm/function.py @@ -1,5 +1,4 @@ from miasm2.arch.x86.disasm import dis_x86_32 -from miasm2.core.asmbloc import bloc2graph # MOV EAX, 0x1337BEEF # MOV ECX, 0x4 @@ -9,10 +8,9 @@ from miasm2.core.asmbloc import bloc2graph # RET shellcode = '\xb8\xef\xbe7\x13\xb9\x04\x00\x00\x00\xc1\xc0\x08\xe2\xfb\xc3' mdis = dis_x86_32(shellcode) -blocs = mdis.dis_multibloc(0) +blocks = mdis.dis_multibloc(0) -for bloc in blocs: - print bloc +for block in blocks: + print block -graph = bloc2graph(blocs) -open('graph.dot', 'w').write(graph) +open('graph.dot', 'w').write(blocks.dot()) |