about summary refs log tree commit diff stats
path: root/example/disasm/full.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2015-10-27 22:48:56 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2015-10-27 22:48:56 +0100
commit3f9071a50671bb7a72d68e2dece83795aa9f9728 (patch)
tree0772e7aa28487f314206b9d5658981a56162d865 /example/disasm/full.py
parent6e0eb4f5eb8c53fc6002b955b96a5c06213d220f (diff)
parent5dbf046bbe07a28485a84eca14405d271d1ea7fa (diff)
downloadmiasm-3f9071a50671bb7a72d68e2dece83795aa9f9728.tar.gz
miasm-3f9071a50671bb7a72d68e2dece83795aa9f9728.zip
Merge pull request #244 from a-vincent/allow_int_base_selection
In interactive use, allow C-like prefixes to choose the base of integers
Diffstat (limited to 'example/disasm/full.py')
-rw-r--r--example/disasm/full.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py
index b813e4fa..db12c45b 100644
--- a/example/disasm/full.py
+++ b/example/disasm/full.py
@@ -43,7 +43,8 @@ parser.add_argument('-l', "--dontdis-retcall", action="store_true",
                     help="If set, disassemble only call destinations")
 parser.add_argument('-s', "--simplify", action="store_true",
                     help="Use the liveness analysis pass")
-parser.add_argument('-o', "--shiftoffset", default=None, type=int,
+parser.add_argument('-o', "--shiftoffset", default=None,
+                    type=lambda x: int(x, 0),
                     help="Shift input binary by an offset")
 parser.add_argument('-a', "--try-disasm-all", action="store_true",
                     help="Try to disassemble the whole binary")
@@ -85,7 +86,7 @@ mdis.dont_dis_nulstart_bloc = not args.dis_nulstart_block
 mdis.follow_call = args.followcall
 
 todo = []
-addrs = [int(a, 16) for a in args.address]
+addrs = [int(a, 0) for a in args.address]
 
 if len(addrs) == 0 and default_addr is not None:
     addrs.append(default_addr)