-
Notifications
You must be signed in to change notification settings - Fork 551
/
dirmap.py
55 lines (43 loc) · 1.24 KB
/
dirmap.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
@Author: xxlin
@LastEditors: xxlin
@Date: 2019-04-10 13:27:59
@LastEditTime: 2023-07-25 15:56:04
'''
import os
import sys
from gevent import monkey
monkey.patch_all()
from lib.controller.engine import run
from lib.core.common import banner, outputscreen, setPaths
from lib.core.data import cmdLineOptions, conf, paths
from lib.core.option import initOptions
from lib.parse.cmdline import cmdLineParser
def main():
"""
main fuction of dirmap
"""
# Make sure the version of python you are using is high enough
if sys.version_info < (3, 8):
outputscreen.error("Sorry, dirmap requires Python 3.8 or higher\n")
sys.exit(1)
# anyway output thr banner information
banner()
# set paths of project
paths.ROOT_PATH = os.getcwd()
setPaths()
# received command >> cmdLineOptions
cmdLineOptions.update(cmdLineParser().__dict__)
# loader script,target,working way(threads? gevent?),output_file from cmdLineOptions
# and send it to conf
initOptions(cmdLineOptions)
# run!
try:
run()
except KeyboardInterrupt:
outputscreen.success("[+] exit")
sys.exit(1)
if __name__ == "__main__":
main()