diff options
| author | Aymeric Vincent <aymeric.vincent@cea.fr> | 2015-10-27 21:27:27 +0100 |
|---|---|---|
| committer | Aymeric Vincent <aymeric.vincent@cea.fr> | 2015-10-27 21:27:27 +0100 |
| commit | 5dbf046bbe07a28485a84eca14405d271d1ea7fa (patch) | |
| tree | 5cabdd356882f4d2606a02cc0ed468894f68a586 /example/disasm/file.py | |
| parent | fb32efb74e2dc1077586a2214de558db6940b70b (diff) | |
| download | focaccia-miasm-5dbf046bbe07a28485a84eca14405d271d1ea7fa.tar.gz focaccia-miasm-5dbf046bbe07a28485a84eca14405d271d1ea7fa.zip | |
In interactive use, allow C-like prefixes to choose the base of integers
Use Python's int(s, 0) to allow string "s" to specify its base where addresses and offsets can be supplied. This change makes the situation homogeneous among the various examples and interactive usage.
Diffstat (limited to 'example/disasm/file.py')
| -rw-r--r-- | example/disasm/file.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/example/disasm/file.py b/example/disasm/file.py index 3555ab18..1a22dfe7 100644 --- a/example/disasm/file.py +++ b/example/disasm/file.py @@ -9,7 +9,7 @@ if len(sys.argv) != 3: print "%s samples/box_upx.exe 0x407570" % sys.argv[0] sys.exit(0) -addr = int(sys.argv[2], 16) +addr = int(sys.argv[2], 0) cont = Container.from_stream(open(sys.argv[1])) mdis = dis_x86_32(cont.bin_stream) # Inform the engine to avoid disassembling null instructions |