diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-05-17 18:05:48 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-05-17 18:05:48 (GMT) |
commit | d110791309783e6e30df837a81cf8e14e1ac9641 (patch) | |
tree | 75e65909e080cc3ace578c7beb6f0bdae6dc18c1 /plugins/python | |
parent | f3e136eab9fd6adcb51988c9f70ca7f35552abc4 (diff) |
Updated the plugin system and its Python documentation.
Diffstat (limited to 'plugins/python')
-rw-r--r-- | plugins/python/abackup/plugin.py | 23 | ||||
-rw-r--r-- | plugins/python/apkfiles/apkfiles.py | 23 | ||||
-rw-r--r-- | plugins/python/checksec/plugin.py | 21 | ||||
-rw-r--r-- | plugins/python/liveconv/plugin.py | 19 |
4 files changed, 28 insertions, 58 deletions
diff --git a/plugins/python/abackup/plugin.py b/plugins/python/abackup/plugin.py index d8f52b1..aea9a9c 100644 --- a/plugins/python/abackup/plugin.py +++ b/plugins/python/abackup/plugin.py @@ -34,27 +34,18 @@ from .password import PasswordReader class AndroidBackupPlugin(PluginModule): """Open and process Android backup files.""" + _name = 'AndroidBackup' + _desc = 'Add suppport for the Android backup file format' + _version = '0.1' + _url = 'https://www.chrysalide.re/' - def __init__(self): - """Initialize the plugin for Chrysalide.""" + _actions = ( PluginModule.PluginAction.CONTENT_EXPLORER, ) - interface = { - 'name' : 'AndroidBackup', - 'desc' : 'Add suppport for the Android backup file format', - 'version' : '0.1', - - 'actions' : ( PluginModule.PGA_CONTENT_EXPLORER, ) - - } - - super(AndroidBackupPlugin, self).__init__(**interface) - - - def handle_binary_content(self, action, content, wid, status): + def _handle_binary_content(self, action, content, wid, status): """Process an operation on a binary content.""" - assert(action == PluginModule.PGA_CONTENT_EXPLORER) + assert(action == PluginModule.PluginAction.CONTENT_EXPLORER) try: backup = AndroidBackup(content) diff --git a/plugins/python/apkfiles/apkfiles.py b/plugins/python/apkfiles/apkfiles.py index 47dfac4..98d31c7 100644 --- a/plugins/python/apkfiles/apkfiles.py +++ b/plugins/python/apkfiles/apkfiles.py @@ -12,27 +12,18 @@ import zipfile class ApkFiles(PluginModule): """Open and process APK files.""" + _name = 'ApkFiles' + _desc = 'Add suppport for the APK file format' + _version = '0.1' + _url = 'https://www.chrysalide.re/' - def __init__(self): - """Initialize the plugin for Chrysalide.""" + _actions = ( PluginModule.PluginAction.CONTENT_EXPLORER, ) - interface = { - 'name' : 'ApkFiles', - 'desc' : 'Add suppport for the APK file format', - 'version' : '0.1', - - 'actions' : ( PluginModule.PGA_CONTENT_EXPLORER, ) - - } - - super(ApkFiles, self).__init__(**interface) - - - def handle_binary_content(self, action, content, wid, status): + def _handle_binary_content(self, action, content, wid, status): """Process an operation on a binary content.""" - assert(action == PluginModule.PGA_CONTENT_EXPLORER) + assert(action == PluginModule.PluginAction.CONTENT_EXPLORER) pseudo_file = io.BytesIO(content.data) diff --git a/plugins/python/checksec/plugin.py b/plugins/python/checksec/plugin.py index f1229bb..6ab213f 100644 --- a/plugins/python/checksec/plugin.py +++ b/plugins/python/checksec/plugin.py @@ -10,24 +10,15 @@ from pychrysalide.format.elf import ElfFormat class CheckSec(PluginModule): """Check for Elf mititgations.""" + _name = 'CheckSec' + _desc = 'Output the exploit mitigations compiled with a loaded binary' + _version = '0.1' + _url = 'https://www.chrysalide.re/' - def __init__(self): - """Initialize the plugin for Chrysalide.""" + _actions = ( PluginModule.PluginAction.FORMAT_POST_ANALYSIS_ENDED, ) - interface = { - 'name' : 'CheckSec', - 'desc' : 'Output the exploit mitigations compiled with a loaded binary', - 'version' : '0.1', - - 'actions' : ( PluginModule.PGA_FORMAT_POST_ANALYSIS_ENDED, ) - - } - - super(CheckSec, self).__init__(**interface) - - - def handle_format_analysis(self, action, format, gid, status): + def _handle_format_analysis(self, action, format, gid, status): """Get notified at the end of format analysis.""" if type(format) == ElfFormat: diff --git a/plugins/python/liveconv/plugin.py b/plugins/python/liveconv/plugin.py index a1a182e..eadbea0 100644 --- a/plugins/python/liveconv/plugin.py +++ b/plugins/python/liveconv/plugin.py @@ -8,21 +8,18 @@ from .panel import ConvPanel class LiveConverter(PluginModule): """Convert raw values into interpreted values.""" + _name = 'LiveConverter' + _desc = 'Convert raw values into interprered values' + _version = '0.1' + _url = 'https://www.chrysalide.re/' - def __init__(self): - """Initialize the plugin for Chrysalide.""" - - interface = { + _actions = ( ) - 'name' : 'LiveConverter', - 'desc' : 'Convert raw values into interprered values', - 'version' : '0.1', - 'actions' : ( ) - - } + def __init__(self): + """Initialize the plugin for Chrysalide.""" - super(LiveConverter, self).__init__(**interface) + super(LiveConverter, self).__init__() p = ConvPanel() |