From 0fecc22af0a10d4871e68532bbab69d1bffadec5 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Fri, 8 Feb 2019 13:45:00 +0100 Subject: API: replace shift_offset by base_address WARNING: base address is the negative of shift_offset --- miasm2/analysis/binary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'miasm2/analysis/binary.py') diff --git a/miasm2/analysis/binary.py b/miasm2/analysis/binary.py index 90d71369..93bd74b2 100644 --- a/miasm2/analysis/binary.py +++ b/miasm2/analysis/binary.py @@ -68,7 +68,7 @@ class Container(object): """Instantiate a container and parse the binary @stream: stream to use as binary @vm: (optional) VmMngr instance to link with the executable - @addr: (optional) Shift to apply before parsing the binary. If set, + @addr: (optional) Base address of the parsed binary. If set, force the unknown format """ return Container.from_string(stream.read(), *args, **kwargs) @@ -215,7 +215,7 @@ class ContainerUnknown(Container): "Container abstraction for unknown format" def parse(self, data, vm=None, addr=0, **kwargs): - self._bin_stream = bin_stream_str(data, shift=addr) + self._bin_stream = bin_stream_str(data, base_address=addr) if vm is not None: vm.add_memory_page(addr, PAGE_READ, -- cgit 1.4.1