blob: c406231d5226612057577f1347f2a70a0287c8f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
from pychrysalide import Plugin
from pychrysalide.gui.panels import LogPanel
from basic_blocks import show_basic_blocks
class Demo(Plugin):
"""Demonstration plugin."""
def init(self, ref):
"""Initialize the plugin."""
LogPanel.log_message(LogPanel.LMT_WARNING, 'Welcome to the demo Python plugin !')
return True
def get_action(self):
"""Register the plugin for given actions."""
return Plugin.PGA_BINARY_GROUPED
def execute_on_binary(self, binary, action):
"""Process registered actions."""
show_basic_blocks(binary)
|