diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2015-01-26 10:04:24 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2015-01-26 10:04:24 +0100 |
| commit | b87f775c1a6a5c78c62beee925eaba6dc337577e (patch) | |
| tree | cf2650f575971bf8a23655a28c944e9e8a9da561 /example/disasm/file.py | |
| parent | c59591a779ac644d1b50a720aea93cd8b36a2ddf (diff) | |
| parent | 7b9bbe4754db4d1f5229cc5cc5769ad6cf2e0a84 (diff) | |
| download | miasm-b87f775c1a6a5c78c62beee925eaba6dc337577e.tar.gz miasm-b87f775c1a6a5c78c62beee925eaba6dc337577e.zip | |
Merge pull request #45 from commial/refactor-examples
Refactor examples
Diffstat (limited to '')
| -rw-r--r-- | example/disasm/file.py (renamed from example/disasm_03.py) | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/example/disasm_03.py b/example/disasm/file.py index 1141dc55..5bae0e89 100644 --- a/example/disasm_03.py +++ b/example/disasm/file.py @@ -5,15 +5,15 @@ from miasm2.analysis.binary import Container if len(sys.argv) != 3: print 'Example:' - print "%s box_upx.exe 0x410f90" % sys.argv[0] + 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) |