summaryrefslogtreecommitdiff
path: root/plugins/python/apkfiles
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-01-03 23:47:07 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-01-03 23:47:07 (GMT)
commit0b2cada60941d109bde2f54a198f4c3a799e0606 (patch)
tree027159249ad8170dd090f3e5d1fe353bf5fe773c /plugins/python/apkfiles
parent55ccf25e0c6666436f0ecd222e60208ebf6ab30e (diff)
Updated the Python plugins.
Diffstat (limited to 'plugins/python/apkfiles')
-rw-r--r--plugins/python/apkfiles/apkfiles.py16
1 files changed, 8 insertions, 8 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():