diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2024-02-26 14:53:17 -0500 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2024-02-26 14:53:17 -0500 |
| commit | fb7bef063f982495e2b23a115c34ead37b449483 (patch) | |
| tree | fbb5c295645467384cbe96b8ceee75ecdb5a24d3 /python | |
| parent | fda777533bb72e0aee1a9dcfde12f50bed0694d8 (diff) | |
fix plugincommand docs
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 9 | ||||
| -rw-r--r-- | python/highlevelil.py | 2 | ||||
| -rw-r--r-- | python/mediumlevelil.py | 1 | ||||
| -rw-r--r-- | python/plugin.py | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 72453940..c623e44f 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -2365,6 +2365,7 @@ class BinaryView: >>> binaryninja.load('/bin/ls', options={'loader.imageBase': 0xfffffff0000, 'loader.macho.processFunctionStarts' : False}) <BinaryView: '/bin/ls', start 0xfffffff0000, len 0xa290> >>> + """ binaryninja._init_plugins() @@ -4586,6 +4587,7 @@ class BinaryView: :param int length: optional length of query :return: list of integers :rtype: list(integer) + :Example: >>> bv.get_data_refs(here) @@ -4617,6 +4619,7 @@ class BinaryView: :param int length: optional length of query :return: list of integers :rtype: list(integer) + :Example: >>> bv.get_data_refs_from(here) @@ -5713,6 +5716,7 @@ class BinaryView: :param str tag_type_name: The name of the tag type for this Tag :param str data: additional data for the Tag :param bool user: Whether or not a user tag + :Example: >>> bv.add_tag(here, "Crashes", "Null pointer dereference") @@ -6462,6 +6466,7 @@ class BinaryView: :param path: Pathname of the desired Component :return: The Component at that pathname + :Example: >>> c = bv.create_component(name="MyComponent") @@ -6936,6 +6941,7 @@ class BinaryView: :param LinearViewCursor pos: Position to start retrieving linear disassembly lines from :return: a list of :py:class:`~binaryninja.lineardisassembly.LinearDisassemblyLine` objects for the previous lines. + :Example: >>> settings = DisassemblySettings() @@ -7914,8 +7920,7 @@ class BinaryView: def associated_type_archive_types(self) -> Mapping['_types.QualifiedName', Tuple[Optional['typearchive.TypeArchive'], str]]: """ Get a list of all types in the analysis that are associated with attached type archives - :return: Map of all analysis types to their corresponding archive / id. - If a type is associated with a disconnected type archive, the archive will be None. + :return: Map of all analysis types to their corresponding archive / id. If a type is associated with a disconnected type archive, the archive will be None. """ result = {} diff --git a/python/highlevelil.py b/python/highlevelil.py index 60addda5..c9126eb5 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -816,6 +816,7 @@ class HighLevelILInstruction(BaseILInstruction): :param HighLevelILVisitorCallback cb: Callback function that takes the name of the operand, the operand, operand type, and parent instruction :return: True if all instructions were visited, False if the callback returned False + """ if cb(name, self, "HighLevelILInstruction", parent) == False: return False @@ -861,6 +862,7 @@ class HighLevelILInstruction(BaseILInstruction): :param HighLevelILVisitorCallback cb: Callback function that takes the name of the operand, the operand, operand type, and parent instruction :return: True if all instructions were visited, False if the callback returned False + :Example: >>> def visitor(_a, inst, _c, _d) -> bool: >>> if isinstance(inst, Constant): diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index 30f29abe..412d3c19 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -508,6 +508,7 @@ class MediumLevelILInstruction(BaseILInstruction): :param MediumLevelILVisitorCallback cb: Callback function that takes the name of the operand, the operand, operand type, and parent instruction :return: True if all instructions were visited, False if the callback returned False + :Example: >>> def visitor(_a, inst, _c, _d) -> bool: >>> if isinstance(inst, Constant): diff --git a/python/plugin.py b/python/plugin.py index 455d511e..e68e30d5 100644 --- a/python/plugin.py +++ b/python/plugin.py @@ -104,7 +104,7 @@ class _PluginCommandMetaClass(type): class PluginCommand(metaclass=_PluginCommandMetaClass): """ - The ``class PluginCommand` contains all the plugin registration methods as class methods. + The ``class PluginCommand`` contains all the plugin registration methods as class methods. You shouldn't need to create an instance of this class, instead see `register`, `register_for_address`, `register_for_function`, and similar class methods for examples |
