diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 25 | ||||
| -rw-r--r-- | python/filemetadata.py | 5 | ||||
| -rw-r--r-- | python/types.py | 1 |
3 files changed, 20 insertions, 11 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index fe182925..d8a5d387 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -3138,7 +3138,7 @@ class BinaryView: def perform_get_default_endianness(self) -> Endianness: """ - ``perform_get_default_endianness`` implements a check which returns true if the BinaryView is executable. + ``perform_get_default_endianness`` implements a check which returns the Endianness of the BinaryView .. note:: This method **may** be implemented for custom BinaryViews that are not LittleEndian. @@ -3303,18 +3303,25 @@ class BinaryView: def navigate(self, view_name: str, offset: int) -> bool: """ - ``navigate`` navigates the UI to the specified virtual address + ``navigate`` navigates the UI to the specified virtual address in the specified View - .. note:: Despite the confusing name, ``view`` in this context is not a BinaryView but rather a string describing the different UI Views. Check :py:attr:`view` while in different views to see examples such as ``Linear:ELF``, ``Graph:PE``. + The View name is created by combining a View type (e.g. "Graph") with a BinaryView type (e.g. "Mach-O"), + seperated by a colon, resulting in something like "Graph:Mach-O". - :param str view: virtual address to read from. + :param str view_name: View name. :param int offset: address to navigate to - :return: whether or not navigation succeeded + :return: whether navigation succeeded :rtype: bool :Example: - >>> import random - >>> bv.navigate(bv.view, random.choice(list(bv.functions)).start) + >>> bv.navigate(bv.view, bv.start) + True + >>> bv.file.existing_views + ['Mach-O', 'Raw'] + >>> import binaryninjaui + >>> [i.getName() for i in binaryninjaui.ViewType.getTypes()] + ['Graph', 'Hex', 'Linear', 'Strings', 'Types', 'Triage', 'Bytes'] + >>> bv.navigate('Graph:Mach-O', bv.entry_point) True """ return self._file.navigate(view_name, offset) @@ -3598,7 +3605,7 @@ class BinaryView: def add_entry_point(self, addr: int, plat: Optional['_platform.Platform'] = None) -> None: """ - ``add_entry_point`` adds an virtual address to start analysis from for a given plat. + ``add_entry_point`` adds a virtual address to start analysis from for a given plat. :param int addr: virtual address to start analysis from :param Platform plat: Platform for the entry point analysis @@ -3912,7 +3919,7 @@ class BinaryView: ``get_function_at`` gets a Function object for the function that starts at virtual address ``addr``: :param int addr: starting virtual address of the desired function - :param Platform plat: plat of the desired function + :param Platform plat: platform of the desired function :return: returns a Function object or None for the function at the virtual address provided :rtype: Function :Example: diff --git a/python/filemetadata.py b/python/filemetadata.py index bd9a9954..6b655fee 100644 --- a/python/filemetadata.py +++ b/python/filemetadata.py @@ -165,6 +165,7 @@ class FileMetadata: @property def nav(self) -> Optional[NavigationHandler]: + """Navigation handler for this FileMetadata (read/write)""" return self._nav @nav.setter @@ -304,7 +305,7 @@ class FileMetadata: def begin_undo_actions(self) -> None: """ - ``begin_undo_actions`` start recording actions taken so the can be undone at some point. + ``begin_undo_actions`` start recording actions taken so they can be undone at some point. :rtype: None :Example: @@ -502,7 +503,7 @@ class FileMetadata: if view_type is None: return None - assert self.raw is not None, "BinaryView.save_auto_snapshot called when raw view is None" + assert self.raw is not None, "BinaryView.get_view_of_type called when raw view is None" view = core.BNCreateBinaryViewOfType(view_type, self.raw.handle) if view is None: return None diff --git a/python/types.py b/python/types.py index ea70a6c5..2734f0a9 100644 --- a/python/types.py +++ b/python/types.py @@ -336,6 +336,7 @@ class CoreSymbol: @property def auto(self) -> bool: + """Whether the symbol was auto-defined""" return core.BNIsSymbolAutoDefined(self._handle) @property |
