pluginmanager module

Class

Description

binaryninja.pluginmanager.Extension

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

binaryninja.pluginmanager.ExtensionVersion

binaryninja.pluginmanager.ExtensionVersionPlatform

binaryninja.pluginmanager.Repository

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

binaryninja.pluginmanager.RepositoryManager

RepositoryManager Keeps track of all the repositories and keeps the enabled_plugins.json…

Function

Description

binaryninja.pluginmanager.RepoPlugin

Deprecated since version 5.3: Use binaryninja.Extension instead.

Extension

class Extension[source]

Bases: object

Extension is mostly read-only, however you can install/uninstall enable/disable plugins. Extensions are created by parsing the plugins.json in a plugin repository.

__init__(handle: core.BNRepoPluginHandle)[source]
Parameters:

handle (core.BNRepoPluginHandle) –

enable(force: bool = False) bool[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 but you’d like to attempt to load it on macOS)

Parameters:

force (bool) –

Return type:

bool

install(version_id=None) bool[source]

Attempt to install the given plugin

Return type:

bool

install_dependencies() bool[source]
Return type:

bool

uninstall() bool[source]

Attempt to uninstall the given plugin

Return type:

bool

property api: List[str]

String indicating the API used by the plugin

property author: str | None

String of the plugin author

property author_url: str | None

String URL of the plugin author’s url

property being_deleted: bool

Boolean status indicating that the plugin is being deleted

property being_updated: bool

Boolean status indicating that the plugin is being updated

property current_version: ExtensionVersion

Current version metadata for the plugin

property delete_pending: bool

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

property dependencies: str

Dependencies required for installing this plugin

property dependencies_being_installed: bool

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

property description: str | None

String short description of the plugin

Deprecated since version 5.3: Use current_version in combination with versions instead.

property disable_pending: bool

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

property enabled: bool

Boolean True if the plugin is currently enabled, False otherwise

property install_platforms: List[str]

List of platforms this plugin can execute on

property installed: bool

Boolean True if the plugin is installed, False otherwise

property last_update: date

Returns a datetime object representing the plugins last update

Deprecated since version 5.3: Use versions in combination with current_version to check for updates instead.

property license_text: str | None

String complete license text for the given plugin

Deprecated since version 5.3: This field will be removed.

property long_description: str | None

String long description of the plugin

property maximum_version_info: CoreVersionInfo

Maximum version info the plugin will support

minimum_version

Minimum version the plugin was tested on

Deprecated since version 4.0.5366: Use minimum_version_info instead.

property minimum_version_info: CoreVersionInfo

Minimum version info the plugin was tested on

property name: str

String name of the plugin

property package_url: str | None

String URL of the plugin’s zip file

Deprecated since version 5.3: Use current_version in combination with versions instead.

property path: str

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

property plugin_types: List[PluginType]

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

property project_data: Dict

Gets a json object of the project data field

Deprecated since version 5.3: This field will be removed.

property project_url: str | None

String URL of the plugin’s git repository

property running: bool

Boolean status indicating that the plugin is currently running

property subdir: str

Optional sub-directory the plugin code lives in as a relative path from the plugin root

property update_available: bool

Boolean status indicating that the plugin has updates available

property update_pending: bool

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

property version: str | None

String version of the plugin

Deprecated since version 5.3: Use current_version in combination with versions instead.

property versions: List[ExtensionVersion]

Version metadata for all available plugin versions

ExtensionVersion

class ExtensionVersion[source]

Bases: object

ExtensionVersion(id: str, version: str, long_description: str, changelog: str, minimum_client_version: int, platforms: List[binaryninja.pluginmanager.ExtensionVersionPlatform], created: str)

__init__(id: str, version: str, long_description: str, changelog: str, minimum_client_version: int, platforms: List[ExtensionVersionPlatform], created: str) None
Parameters:
Return type:

None

changelog: str
created: str
id: str
long_description: str
minimum_client_version: int
platforms: List[ExtensionVersionPlatform]
version: str

ExtensionVersionPlatform

class ExtensionVersionPlatform[source]

Bases: object

ExtensionVersionPlatform(name: str, download_url: str, untracked_download_url: str)

__init__(name: str, download_url: str, untracked_download_url: str) None
Parameters:
  • name (str) –

  • download_url (str) –

  • untracked_download_url (str) –

Return type:

None

download_url: str
name: str
untracked_download_url: str

Repository

class Repository[source]

Bases: object

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

__init__(handle: LP_BNRepository) None[source]
Parameters:

handle (LP_BNRepository) –

Return type:

None

property full_path: str

String full path the repository

property path: str

String local path to store the given plugin repository

property plugins: List[Extension]

List of Extension objects contained within this repository

property url: str

String URL of the git repository where the plugin repository’s are stored

RepositoryManager

class RepositoryManager[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

__init__()[source]
add_repository(url: str | None = None, repopath: str | None = None) bool[source]

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

To remove a repository, restart Binary Ninja (and don’t re-add the repository!). File artifacts will remain on disk under repositories/ file in the User Folder.

Before you can query plugin metadata from a repository, you need to call check_for_updates.

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
>>> mgr.check_for_updates()
>>>
check_for_updates() bool[source]

Check for updates for all managed Repository objects

Return type:

bool

property default_repository: Repository

Gets the default Repository

property plugins: Dict[str, List[Extension]]

List of all Extensions in each repository

property repositories: List[Repository]

List of Repository objects being managed

RepoPlugin

RepoPlugin(handle: core.BNRepoPluginHandle)[source]

Deprecated since version 5.3: Use binaryninja.Extension instead.

Parameters:

handle (core.BNRepoPluginHandle) –