diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-01-08 17:20:40 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2015-01-23 17:24:42 +0100 |
| commit | a20db36fb2631350ceb98eee51e3ee408b080b96 (patch) | |
| tree | d9363964ec32cba7734dc56200854b670dff33a4 | |
| parent | 17258a346c5ecf423b0758f5de6cf56f423b9e88 (diff) | |
| download | miasm-a20db36fb2631350ceb98eee51e3ee408b080b96.tar.gz miasm-a20db36fb2631350ceb98eee51e3ee408b080b96.zip | |
Example/Disasm_03: Comment and expand variables names
| -rw-r--r-- | example/disasm_03.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/example/disasm_03.py b/example/disasm_03.py index f86a485e..5bae0e89 100644 --- a/example/disasm_03.py +++ b/example/disasm_03.py @@ -8,12 +8,12 @@ if len(sys.argv) != 3: print "%s samples/box_upx.exe 0x410f90" % sys.argv[0] sys.exit(0) -ad = int(sys.argv[2], 16) +addr = int(sys.argv[2], 16) cont = Container.from_stream(open(sys.argv[1])) mdis = dis_x86_32(cont.bin_stream) -# inform the engine not to disasm nul instructions +# Inform the engine to avoid disassembling null instructions mdis.dont_dis_nulstart_bloc = True -blocs = mdis.dis_multibloc(ad) +blocs = mdis.dis_multibloc(addr) -g = bloc2graph(blocs) -open('graph.txt', 'w').write(g) +graph = bloc2graph(blocs) +open('graph.txt', 'w').write(graph) |