diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-03 23:47:07 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-03 23:47:07 (GMT) |
commit | 0b2cada60941d109bde2f54a198f4c3a799e0606 (patch) | |
tree | 027159249ad8170dd090f3e5d1fe353bf5fe773c | |
parent | 55ccf25e0c6666436f0ecd222e60208ebf6ab30e (diff) |
Updated the Python plugins.
-rw-r--r-- | plugins/python/apkfiles/apkfiles.py | 16 | ||||
-rw-r--r-- | plugins/python/checksec/plugin.py | 11 |
2 files changed, 14 insertions, 13 deletions
diff --git a/plugins/python/apkfiles/apkfiles.py b/plugins/python/apkfiles/apkfiles.py index b6df2de..fea9c07 100644 --- a/plugins/python/apkfiles/apkfiles.py +++ b/plugins/python/apkfiles/apkfiles.py @@ -2,9 +2,9 @@ # -*- coding: utf-8 -*- from pychrysalide import PluginModule +from pychrysalide import core from pychrysalide.analysis.contents import EncapsulatedContent from pychrysalide.analysis.contents import MemoryContent -from pychrysalide.core import _global import io import zipfile @@ -13,23 +13,23 @@ class ApkFiles(PluginModule): """Open and process APK files.""" - def get_interface(self): - """Provide the full plugin description.""" + def __init__(self): + """Initialize the plugin for Chrysalide.""" - desc = { + interface = { 'name' : 'ApkFiles', 'desc' : 'Add suppport for the APK file format', 'version' : '0.1', - 'actions' : [ PluginModule.PGA_CONTENT_EXPLORER ] + 'actions' : ( PluginModule.PGA_CONTENT_EXPLORER, ) } - return desc + super(ApkFiles, self).__init__(**interface) - def handle_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) @@ -43,7 +43,7 @@ class ApkFiles(PluginModule): if zf.namelist().count('classes.dex') > 0 \ and zf.namelist().count('AndroidManifest.xml') > 0: - explorer = _global().content_explorer + explorer = core.get_content_explorer() for name in zf.namelist(): diff --git a/plugins/python/checksec/plugin.py b/plugins/python/checksec/plugin.py index 6efb9b5..89c392f 100644 --- a/plugins/python/checksec/plugin.py +++ b/plugins/python/checksec/plugin.py @@ -10,20 +10,21 @@ from pychrysalide.format.elf import ElfFormat class CheckSec(PluginModule): """Check for Elf mititgations.""" - def get_interface(self): - """Provide the full plugin description.""" - desc = { + def __init__(self): + """Initialize the plugin for Chrysalide.""" + + interface = { 'name' : 'CheckSec', 'desc' : 'Output the exploit mitigations compiled with a loaded binary', 'version' : '0.1', - 'actions' : [ PluginModule.PGA_FORMAT_POST_ANALYSIS_ENDED ] + 'actions' : ( PluginModule.PGA_FORMAT_POST_ANALYSIS_ENDED, ) } - return desc + super(CheckSec, self).__init__(**interface) def handle_format_analysis(self, action, format, gid, status): |