MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / MyPlugin

Class MyPlugin

python/examples/update_analysis.py:24–38  ·  view source on GitHub ↗

Sample plugin that uses a BackgroundTaskThread to perform work. This prevents the UI from freezing while the plugin is running and allows the plugin to call update_analysis_and_wait. Note this is for a python plugin, so the steps detailed here apply: https://docs.binary.ninja/dev/plugi

Source from the content-addressed store, hash-verified

22
23
24class MyPlugin(BackgroundTaskThread):
25 """
26 Sample plugin that uses a BackgroundTaskThread to perform work.
27 This prevents the UI from freezing while the plugin is running and allows the plugin to call update_analysis_and_wait.
28
29 Note this is for a python plugin, so the steps detailed here apply: https://docs.binary.ninja/dev/plugins.html
30 i.e. needing a plugin.json etc.
31 """
32 def __init__(self, bv):
33 BackgroundTaskThread.__init__(self, 'Doing my plugin stuff', True)
34 self.bv = bv
35
36 def run(self):
37 # Do stuff
38 self.bv.update_analysis_and_wait()
39
40def main(bv):
41 MyPlugin(bv).start()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected