pluginmanager module¶
binaryninja.pluginmanager.RepoPlugin(handle) |
``RepoPlugin` is mostly read-only, however you can install/uninstall enable/disable plugins. RepoPlugins are |
binaryninja.pluginmanager.Repository(handle) |
Repository is a read-only class. Use RepositoryManager to Enable/Disable/Install/Uninstall plugins. |
binaryninja.pluginmanager.RepositoryManager([...]) |
RepositoryManager Keeps track of all the repositories and keeps the enabled_plugins.json file coherent with |
binaryninja.pluginmanager.range(*args) |
A Python2 and Python3 Compatible Range Generator |
-
class
binaryninja.pluginmanager.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
RepoPlugin.PluginUpdateStatus¶ Bases:
binaryninja.enum.IntEnum-
UpToDatePluginStatus= <PluginUpdateStatus.UpToDatePluginStatus: 0>¶
-
UpdatesAvailablePluginStatus= <PluginUpdateStatus.UpdatesAvailablePluginStatus: 1>¶
-
-
RepoPlugin.api¶ string indicating the api used by the plugin
-
RepoPlugin.description¶ String short description of the plugin
-
RepoPlugin.enabled¶ Boolean True if the plugin is currently enabled, False otherwise
-
RepoPlugin.installed¶ Boolean True if the plugin is installed, False otherwise
-
RepoPlugin.license¶ String short license description (ie MIT, BSD, GPLv2, etc)
-
RepoPlugin.license_text¶ String complete license text for the given plugin
-
RepoPlugin.long_description¶ String long description of the plugin
-
RepoPlugin.minimum_version¶ String minimum version the plugin was tested on
-
RepoPlugin.name¶ String name of the plugin
-
RepoPlugin.path¶ Relative path from the base of the repository to the actual plugin
-
RepoPlugin.plugin_types¶ List of PluginType enumeration objects indicating the plugin type(s)
-
RepoPlugin.update_status¶ PluginUpdateStatus enumeration indicating if the plugin is up to date or not
-
RepoPlugin.url¶ String url of the plugin’s git repository
-
RepoPlugin.version¶ String version of the plugin
-
class
-
class
binaryninja.pluginmanager.Repository(handle)[source]¶ Bases:
objectRepositoryis 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
binaryninja.pluginmanager.RepositoryManager(handle=None)[source]¶ Bases:
objectRepositoryManagerKeeps track of all the repositories and keeps the enabled_plugins.json file coherent with the plugins that are installed/unstalled enabled/disabled-
add_repository(url=None, repopath=None, localreference='master', remotereference='origin')[source]¶ add_repositoryadds 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 >>>
-
default_repository¶ Gets the default Repository
-
disable_plugin(plugin, repo=None)[source]¶ disable_pluginDisable 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_pluginEnables 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_plugininstall 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 >>>
-
plugins¶ List of all RepoPlugins in each repository
-
repositories¶ List of Repository objects being managed
-
uninstall_plugin(plugin, repo=None)[source]¶ uninstall_pluginuninstall 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_pluginupdate 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 >>>
-