forked from vladko312/SSTImap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sstimap.py
executable file
·41 lines (36 loc) · 1.21 KB
/
sstimap.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
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
import sys
from utils import cliparser
from core import checks
from core.channel import Channel
from core.interactive import InteractiveShell
from utils.loggers import log
import traceback
version = '1.0.2'
def main():
args = vars(cliparser.options)
args['version'] = version
if not (args['url'] or args['interactive']):
# no target specified
log.log(22, 'SSTImap requires target url (-u, --url) or interactive mode (-i, --interactive)')
elif args['interactive']:
# interactive mode
log.log(23, 'Starting SSTImap in interactive mode. Type \'help\' to see the details.')
InteractiveShell(args).cmdloop()
else:
# predetermined mode
checks.check_template_injection(Channel(args))
if __name__ == '__main__':
print(cliparser.banner())
if sys.version_info.major != 3:
log.critical(f'SSTImap was created for Python3. Python{sys.version_info.major} is not supported!')
sys.exit()
try:
main()
except (KeyboardInterrupt, EOFError):
print()
log.log(22, 'Exiting')
except Exception as e:
log.critical('Error: {}'.format(e))
log.debug(traceback.format_exc())
raise e