-
Notifications
You must be signed in to change notification settings - Fork 4
/
plugin_Template.py
33 lines (22 loc) · 1.12 KB
/
plugin_Template.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Plugin to handle the tools capable of setting the input for "TEMPLATE" and handle the output
import os
import configparser
import logging as log
config = configparser.ConfigParser()
config.read('config.ini')
log.basicConfig(filename=config['GENERAL']['logDir'] + "appsentinel.log", filemode='a', format='%(asctime)s,%(msecs)d | %(name)s | %(levelname)s | %(funcName)s:%(lineno)d | %(message)s', datefmt='%H:%M:%S', level=log.DEBUG)
pluginName = "Template"
enable = False
# Define any specific configuration directives here
TOOLSPECIFICLocation = config['TOOLSPECIFIC']['TOOLSPECIFICLocation']
# this one is mandatory -> where to place the results of the tool
jsonResultsLocation = config['SCANNER']['jsonResultsLocation'] + "/" + pluginName + "/"
class PluginClass:
def __init__(self):
''' constructor '''
def run(self, apk_file, md5):
print("Running the TEMPLATE plugin!...")
# test the existence of the results directory
if not os.path.exists(jsonResultsLocation):
os.system("mkdir " + jsonResultsLocation)
# everything bellow this is specific of your plugin