pluginmanager module¶
binaryninja.pluginmanager.RepoPlugin (handle) |
``RepoPlugin` is mostly read-only, however you can install/uninstall enable/disable plugins.RepoPlugins are created by parsing the plugins.json in a plugin repository.. |
binaryninja.pluginmanager.Repository (handle) |
Repository is a read-only class. |
binaryninja.pluginmanager.RepositoryManager ([…]) |
RepositoryManager Keeps track of all the repositories and keeps the enabled_plugins.json file coherent with the plugins that are installed/uninstalled enabled/disabled |
binaryninja.pluginmanager.range (*args) |
A Python2 and Python3 Compatible Range Generator |
-
class
RepoPlugin
(handle)[source]¶ Bases:
object
``RepoPlugin` is mostly read-only, however you can install/uninstall enable/disable plugins. RepoPlugins are created by parsing the plugins.json in a plugin repository.
-
class
PluginType
¶ Bases:
binaryninja.enum.IntEnum
-
ArchitecturePluginType
= <PluginType.ArchitecturePluginType: 2>¶
-
BinaryViewPluginType
= <PluginType.BinaryViewPluginType: 3>¶
-
CorePluginType
= <PluginType.CorePluginType: 0>¶
-
UiPluginType
= <PluginType.UiPluginType: 1>¶
-
-
class
PluginUpdateStatus
¶ Bases:
binaryninja.enum.IntEnum
-
UpToDatePluginStatus
= <PluginUpdateStatus.UpToDatePluginStatus: 0>¶
-
UpdatesAvailablePluginStatus
= <PluginUpdateStatus.UpdatesAvailablePluginStatus: 1>¶
-
-
api
¶ string indicating the API used by the plugin
-
description
¶ String short description of the plugin
-
enabled
¶ Boolean True if the plugin is currently enabled, False otherwise
-
installed
¶ Boolean True if the plugin is installed, False otherwise
-
license
¶ String short license description (ie MIT, BSD, GPLv2, etc)
-
license_text
¶ String complete license text for the given plugin
-
long_description
¶ String long description of the plugin
-
minimum_version
¶ String minimum version the plugin was tested on
-
name
¶ String name of the plugin
-
path
¶ Relative path from the base of the repository to the actual plugin
-
plugin_types
¶ List of PluginType enumeration objects indicating the plugin type(s)
-
update_status
¶ PluginUpdateStatus enumeration indicating if the plugin is up to date or not
-
url
¶ String URL of the plugin’s git repository
-
version
¶ String version of the plugin
-
class
-
class
Repository
(handle)[source]¶ Bases:
object
Repository
is a read-only class. Use RepositoryManager to Enable/Disable/Install/Uninstall plugins.-
full_path
¶ String full path the repository
-
initialized
¶ Boolean True when the repository has been initialized
-
local_reference
¶ String for the local git reference (ie ‘master’)
-
path
¶ String local path to store the given plugin repository
-
plugins
¶ List of RepoPlugin objects contained within this repository
-
remote_reference
¶ String for the remote git reference (ie ‘origin’)
-
url
¶ String URL of the git repository where the plugin repository’s are stored
-
-
class
RepositoryManager
(handle=None)[source]¶ Bases:
object
RepositoryManager
Keeps track of all the repositories and keeps the enabled_plugins.json file coherent with the plugins that are installed/uninstalled enabled/disabled-
add_repository
(url=None, repopath=None, localreference='master', remotereference='origin')[source]¶ add_repository
adds a new plugin repository for the manager to track.Parameters: - url (str) – URL to the git repository where the plugins are stored.
- repopath (str) – path to where the repository will be stored on disk locally
- localreference (str) – Optional reference to the local tracking branch typically “master”
- remotereference (str) – Optional reference to the remote tracking branch typically “origin”
Returns: Boolean value True if the repository was successfully added, False otherwise.
Return type: Boolean
Example: >>> mgr = RepositoryManager() >>> mgr.add_repository(url="https://github.com/vector35/community-plugins.git", repopath="myrepo", localreference="master", remotereference="origin") True >>>
-
disable_plugin
(plugin, repo=None)[source]¶ disable_plugin
Disable the specified plugin, pluginpathParameters: - or str repo (Repository) – Repository containing the plugin to disable
- or str plugin (RepoPlugin) – RepoPlugin to disable
Returns: Boolean value True if the plugin was successfully disabled, False otherwise
Return type: Boolean
Example: >>> mgr = RepositoryManager() >>> mgr.disable_plugin('binaryninja-bookmarks') True >>>
-
enable_plugin
(plugin, install=True, repo=None)[source]¶ enable_plugin
Enables the installed plugin ‘plugin’, optionally installing the plugin if install is set to True (default), and optionally using the non-default repository.Parameters: Returns: Boolean value True if the plugin was successfully enabled, False otherwise
Return type: Boolean
Example: >>> mgr = RepositoryManager() >>> mgr.enable_plugin('binaryninja-bookmarks') True >>>
-
install_plugin
(plugin, repo=None)[source]¶ install_plugin
install the specified plugin, pluginpathParameters: - or str repo (Repository) – Repository containing the plugin to install
- or str plugin (RepoPlugin) – RepoPlugin to install
Returns: Boolean value True if the plugin was successfully installed, False otherwise
Return type: Boolean
Example: >>> mgr = RepositoryManager() >>> mgr.install_plugin('binaryninja-bookmarks') True >>>
-
uninstall_plugin
(plugin, repo=None)[source]¶ uninstall_plugin
uninstall the specified plugin, pluginpathParameters: - or str repo (Repository) – Repository containing the plugin to uninstall
- or str plugin (RepoPlugin) – RepoPlugin to uninstall
Returns: Boolean value True if the plugin was successfully uninstalled, False otherwise
Return type: Boolean
Example: >>> mgr = RepositoryManager() >>> mgr.uninstall_plugin('binaryninja-bookmarks') True >>>
-
update_plugin
(plugin, repo=None)[source]¶ update_plugin
update the specified plugin, pluginpathParameters: - or str repo (Repository) – Repository containing the plugin to update
- or str plugin (RepoPlugin) – RepoPlugin to update
Returns: Boolean value True if the plugin was successfully updated, False otherwise
Return type: Boolean
Example: >>> mgr = RepositoryManager() >>> mgr.update_plugin('binaryninja-bookmarks') True >>>
-
default_repository
¶ Gets the default Repository
-
plugins
¶ List of all RepoPlugins in each repository
-
repositories
¶ List of Repository objects being managed
-