diff options
Diffstat (limited to 'plugins/python/androperms/androperms.py')
-rw-r--r-- | plugins/python/androperms/androperms.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/python/androperms/androperms.py b/plugins/python/androperms/androperms.py index ddccb8a..f68b9a5 100644 --- a/plugins/python/androperms/androperms.py +++ b/plugins/python/androperms/androperms.py @@ -5,6 +5,7 @@ from manifest import AndroidManifest from db import PermsDataBase from panel import PermsPanel from pychrysalide import Plugin +from pychrysalide.format.dex import DexFormat from xml.dom import minidom import re @@ -31,6 +32,10 @@ class AndroPerms(Plugin): def execute_on_binary(self, binary, action): """Process once a binary is disassembled.""" + fmt = binary.get_format() + if not isinstance(fmt, DexFormat): + return False + zf = zipfile.ZipFile(binary.get_filename()) f = zf.open('AndroidManifest.xml', 'r') @@ -56,7 +61,6 @@ class AndroPerms(Plugin): db = PermsDataBase() db.filter_permissions(plist) - fmt = binary.get_format() instrs = binary.get_instructions() buf = binary.disassembled_buffer |