-
Notifications
You must be signed in to change notification settings - Fork 224
/
linker.py
executable file
·38 lines (24 loc) · 961 Bytes
/
linker.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
#!/usr/bin/env python
#HEAD#########################################################
#
# Katana Framework | linker
# Last Modified: 15/09/2016
#
#########################################################HEAD#
from core.Internal import (GetRootModules)
import importlib
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--module", help=" Script module to run.")
args = parser.parse_args()
if __name__=="__main__":
for modules in GetRootModules().findall('module'):
if args.module == modules.get('name'):
category = modules.find('category').text
filename = modules.find('filename').text
ModuleToStart = importlib.import_module("modules."+category+"."+filename)
init=ModuleToStart.init()
output = ""
for VAR in init.options:
output += VAR+":_:"+str(init.options[VAR][0])+":_:"+str(init.options[VAR][1])+":_:"+str(init.options[VAR][2])+":_:_:"
print output[:-5]