From b4177eb4deb63cf781d0c8d98f834d4a91c71453 Mon Sep 17 00:00:00 2001 From: Ajax Date: Thu, 19 Jul 2018 14:05:04 +0200 Subject: Add support for reloc and rebase in ContainerELF --- example/disasm/full.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'example/disasm/full.py') diff --git a/example/disasm/full.py b/example/disasm/full.py index 5658c2c2..746d3ee4 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -42,7 +42,7 @@ parser.add_argument('-l', "--dontdis-retcall", action="store_true", help="If set, disassemble only call destinations") parser.add_argument('-s', "--simplify", action="count", help="Apply simplifications rules (liveness, graph simplification, ...)") -parser.add_argument('-o', "--shiftoffset", default=None, +parser.add_argument('-o', "--shiftoffset", default=0, type=lambda x: int(x, 0), help="Shift input binary by an offset") parser.add_argument('-a', "--try-disasm-all", action="store_true", @@ -64,9 +64,8 @@ if args.verbose: log.info('Load binary') if args.rawbinary: - shift = args.shiftoffset if args.shiftoffset is not None else 0 cont = Container.fallback_container(open(args.filename, "rb").read(), - None, addr=shift) + vm=None, addr=args.shiftoffset) else: with open(args.filename, "rb") as fdesc: cont = Container.from_stream(fdesc, addr=args.shiftoffset) -- cgit 1.4.1