summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-11-30 16:02:49 -0500
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-12-01 12:31:35 -0500
commit816e90c9ef4b2093b4245a992e5ca576fb9da8e4 (patch)
treeca7703a55ea007cd3ed3b9af6c62c195c34606f6 /python
parente7b1fae4ac7b4994982424c5ad32177d6cea9589 (diff)
[Python] Add `BinaryView.is_offset_backed_by_file`
Seems we forgot to expose this one
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 2f190375..f9afe2b8 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -4926,7 +4926,7 @@ class BinaryView:
def is_valid_offset(self, addr: int) -> bool:
"""
- ``is_valid_offset`` checks if a virtual address ``addr`` is valid .
+ ``is_valid_offset`` checks if a virtual address ``addr`` is valid.
:param int addr: a virtual address to be checked
:return: True if the virtual address is valid, False if the virtual address is invalid or error
@@ -4934,6 +4934,16 @@ class BinaryView:
"""
return core.BNIsValidOffset(self.handle, addr)
+ def is_offset_backed_by_file(self, addr: int) -> bool:
+ """
+ ``is_offset_backed_by_file`` checks if a virtual address ``addr`` is backed by the original file.
+
+ :param int addr: a virtual address to be checked
+ :return: True if the virtual address is backed by original file, False if the not backed by original file or error
+ :rtype: bool
+ """
+ return core.BNIsOffsetBackedByFile(self.handle, addr)
+
def is_offset_readable(self, addr: int) -> bool:
"""
``is_offset_readable`` checks if a virtual address ``addr`` is valid for reading.