diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-08 13:45:00 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-11 16:03:39 +0100 |
| commit | 0fecc22af0a10d4871e68532bbab69d1bffadec5 (patch) | |
| tree | 2ddee1f7d4d4e5f4b2566d16cec5823cbe084ef3 /miasm2/analysis/binary.py | |
| parent | d73460dd09302b1a272ad7e3e2cfd1c7cf0bf86c (diff) | |
| download | miasm-0fecc22af0a10d4871e68532bbab69d1bffadec5.tar.gz miasm-0fecc22af0a10d4871e68532bbab69d1bffadec5.zip | |
API: replace shift_offset by base_address
WARNING: base address is the negative of shift_offset
Diffstat (limited to 'miasm2/analysis/binary.py')
| -rw-r--r-- | miasm2/analysis/binary.py | 4 |
1 files changed, 2 insertions, 2 deletions
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, |