summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python/apkfiles/apkfiles.py16
-rw-r--r--plugins/python/checksec/plugin.py11
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):