From bce6c88c9eb1ae1aa33ef0affdb7dbda8814cf88 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Thu, 14 Nov 2019 19:11:42 -0500 Subject: Initial dynamic rebasing support. --- python/binaryview.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index 2663b677..4aa245d2 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4870,6 +4870,20 @@ class BinaryView(object): """ core.BNReanalyzeAllFunctions(self.handle) + def rebase(self, address, progress_func = None): + """ + ``rebase`` rebase the binary view at the specified virtual address + + :param int address: virtual address of the start of the binary view + :return: boolean True on success, False on failure. + :rtype: bool + """ + if progress_func is None: + return core.BNRebase(self.handle, address) + else: + return core.BNRebaseWithProgress(self.handle, address, None, ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)( + lambda ctxt, cur, total: progress_func(cur, total))) + def show_plain_text_report(self, title, contents): core.BNShowPlainTextReport(self.handle, title, contents) -- cgit v1.3.1