From ab12527cffa04b04ac282d64b2eb30391808757a Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 5 Jan 2024 15:47:54 +0800 Subject: Add a new API to get the original image base of the binary view. Fix https://github.com/Vector35/binaryninja-api/issues/4861 --- python/binaryview.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index d2ef315f..de7e438b 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -2509,6 +2509,16 @@ class BinaryView: """:py:class:`~binaryninja.filemetadata.FileMetadata` backing the BinaryView """ return self._file + @property + def original_base(self) -> int: + """Original image base of the binary""" + return core.BNGetOriginalBase(self.handle) + + @original_base.setter + def original_base(self, base: int) -> None: + """Set original image base of the binary. Only intended for binary view implementations""" + return core.BNSetOriginalBase(self.handle, base) + @property def start(self) -> int: """Start offset of the binary (read-only)""" -- cgit v1.3.1