plugin module

binaryninja.plugin.BackgroundTask([…])

binaryninja.plugin.BackgroundTaskThread([…])

binaryninja.plugin.MainThreadAction(handle)

binaryninja.plugin.MainThreadActionHandler()

binaryninja.plugin.PluginCommand(cmd)

binaryninja.plugin.PluginCommandContext(view)

binaryninja.plugin.range(*args)

A Python2 and Python3 Compatible Range Generator

binaryninja.plugin.with_metaclass(meta, *bases)

Create a base class with a metaclass.

class BackgroundTask(initial_progress_text='', can_cancel=False, handle=None)[source]

Bases: object

cancel()[source]
finish()[source]
can_cancel

Whether the task can be cancelled (read-only)

cancelled

Whether the task has been cancelled

finished

Whether the task has finished

list = []
progress

Text description of the progress of the background task (displayed in status bar of the UI)

class BackgroundTaskThread(initial_progress_text='', can_cancel=False)[source]

Bases: binaryninja.plugin.BackgroundTask

join(timeout=None)[source]
run()[source]
start()[source]
class MainThreadAction(handle)[source]

Bases: object

execute()[source]
wait()[source]
done
class MainThreadActionHandler[source]

Bases: object

add_action(action)[source]
register()[source]
class PluginCommand(cmd)[source]

Bases: object

execute(context)[source]
classmethod get_valid_list(context)[source]

Dict of registered plugins

is_valid(context)[source]
classmethod register(name, description, action, is_valid=None)[source]

register Register a plugin

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView as an argument

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register with the same function name will replace the existing function but will leak the memory of the original plugin.

classmethod register_for_address(name, description, action, is_valid=None)[source]

register_for_address Register a plugin to be called with an address argument

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView and address as arguments

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register_for_address with the same function name will replace the existing function but will leak the memory of the original plugin.

classmethod register_for_function(name, description, action, is_valid=None)[source]

register_for_function Register a plugin to be called with a function argument

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView and a Function as arguments

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register_for_function with the same function name will replace the existing function but will leak the memory of the original plugin.

classmethod register_for_low_level_il_function(name, description, action, is_valid=None)[source]

register_for_low_level_il_function Register a plugin to be called with a low level IL function argument

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView and a LowLevelILFunction as arguments

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register_for_low_level_il_function with the same function name will replace the existing function but will leak the memory of the original plugin.

classmethod register_for_low_level_il_instruction(name, description, action, is_valid=None)[source]

register_for_low_level_il_instruction Register a plugin to be called with a low level IL instruction argument

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView and a LowLevelILInstruction as arguments

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register_for_low_level_il_instruction with the same function name will replace the existing function but will leak the memory of the original plugin.

classmethod register_for_medium_level_il_function(name, description, action, is_valid=None)[source]

register_for_medium_level_il_function Register a plugin to be called with a medium level IL function argument

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView and a MediumLevelILFunction as arguments

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register_for_medium_level_il_function with the same function name will replace the existing function but will leak the memory of the original plugin.

classmethod register_for_medium_level_il_instruction(name, description, action, is_valid=None)[source]

register_for_medium_level_il_instruction Register a plugin to be called with a medium level IL instruction argument

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView and a MediumLevelILInstruction as arguments

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register_for_medium_level_il_instruction with the same function name will replace the existing function but will leak the memory of the original plugin.

classmethod register_for_range(name, description, action, is_valid=None)[source]

register_for_range Register a plugin to be called with a range argument

Parameters
  • name (str) – name of the plugin

  • description (str) – description of the plugin

  • action – function to call with the BinaryView and AddressRange as arguments

  • is_valid – optional argument of a function passed a BinaryView to determine whether the plugin should be enabled for that view

Return type

None

Warning

Calling register_for_range with the same function name will replace the existing function but will leak the memory of the original plugin.

list = [<PluginCommand: PDB\Load (BETA)>, <PluginCommand: PDB\Set symbol path (BETA)>]
class PluginCommandContext(view)[source]

Bases: object