pluginmanager module

binaryninja.pluginmanager.RepoPlugin(handle)

RepoPlugin is mostly read-only, however you can install/uninstall enable/disable plugins.

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.datetime(year, …)

The year, month and day arguments are required.

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.

enable(force=False)[source]

Enable this plugin, optionally trying to force it. Force loading a plugin with ignore platform and api constraints. (e.g. The plugin author says the plugin will only work on Linux-python3 but you’d like to attempt to load it on Macos-python2)

install()[source]

Attempt to install the given plugin

install_dependencies()[source]
install_instructions(platform)[source]

Installation instructions for the given platform

Parameters

platform (str) – One of the valid platforms “Windows”, “Linux”, “Darwin”

Returns

String of the installation instructions for the provided platform

Return type

str

uninstall()[source]

Attempt to uninstall the given plugin

property api

String indicating the API used by the plugin

property author

String of the plugin author

property author_url

String URL of the plugin author’s url

property being_deleted

Boolean status indicating that the plugin is being deleted

property being_updated

Boolean status indicating that the plugin is being updated

property delete_pending

Boolean status indicating that the plugin will be deleted after the next restart

property dependencies

Dependencies required for installing this plugin

property dependencies_being_installed

Boolean status indicating that the plugin’s dependencies are currently being installed

property description

String short description of the plugin

property disable_pending

Boolean status indicating that the plugin will be disabled after the next restart

property enabled

Boolean True if the plugin is currently enabled, False otherwise

property install_platforms

List of platforms this plugin can execute on

property installed

Boolean True if the plugin is installed, False otherwise

property last_update

Returns a datetime object representing the plugins last update

property license

String short license description (ie MIT, BSD, GPLv2, etc)

property license_text

String complete license text for the given plugin

property long_description

String long description of the plugin

property minimum_version

String minimum version the plugin was tested on

property name

String name of the plugin

property package_url

String URL of the plugin’s zip file

property path

Relative path from the base of the repository to the actual plugin

property plugin_types

List of PluginType enumeration objects indicating the plugin type(s)

property project_data

Gets a json object of the project data field

property project_url

String URL of the plugin’s git repository

property running

Boolean status indicating that the plugin is currently running

property update_available

Boolean status indicating that the plugin has updates available

property update_pending

Boolean status indicating that the plugin has updates will be installed after the next restart

property version

String version of the plugin

class Repository(handle)[source]

Bases: object

Repository is a read-only class. Use RepositoryManager to Enable/Disable/Install/Uninstall plugins.

property full_path

String full path the repository

property path

String local path to store the given plugin repository

property plugins

List of RepoPlugin objects contained within this repository

property 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)[source]

add_repository adds a new plugin repository for the manager to track.

Parameters
  • url (str) – URL to the plugins.json containing the records for this repository

  • repopath (str) – path to where the repository will be stored on disk locally

Returns

Boolean value True if the repository was successfully added, False otherwise.

Return type

Boolean

Example
>>> mgr = RepositoryManager()
>>> mgr.add_repository("https://raw.githubusercontent.com/Vector35/community-plugins/master/plugins.json", "community")
True
>>>
check_for_updates()[source]

Check for updates for all managed Repository objects

property default_repository

Gets the default Repository

property plugins

List of all RepoPlugins in each repository

property repositories

List of Repository objects being managed