-
Notifications
You must be signed in to change notification settings - Fork 27
/
suturebox.py
64 lines (55 loc) · 2.33 KB
/
suturebox.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
56
57
58
59
60
61
62
63
64
# -*- coding: utf-8 -*-
import os
import platform
import sys
import threading
from System import globalVar as gl
from controller.controller import Repeater,dow_rep
from method.colour import Get_colour
from method.function import times,col,handle_exclude_list
from method.command import command
from method.banner import banner,Get_list
from method.set_ini import ini_init
print(banner()) # 打印随机banner
args = command() # 获取参数
# 初始化全局变量
gl._init()
def main(target,modular,tool,info,single,exclude,output_file,down,proxy):
# 将各常用变量注册为全局变量
gl.set('root_path', os.getcwd())
gl.set('target', target)
gl.set('*',Get_colour().yel_info())
gl.set('-',Get_colour().red_warn())
gl.set('+',Get_colour().gre_ok())
gl.set('time',times)
gl.set('col',col)
gl.set('info',info)
gl.set('single',single)
gl.set('lock',threading.Lock())
gl.set('exclude',exclude)
gl.set('JSFinder_mode','URL') # JSFinder的输出匹配格式
gl.set('output_file',output_file)
gl.set('file_exis',True)
gl.set('collect_tools', ["CmsVulScan", "JSFinder", "TideFinger", "dirmap", "dismap", "identYwaf", "ksubdomain"])
gl.set('vulscan_tools', ["POC_bomber", "nuclei", "vulmap"])
gl.set('system',platform.system()) # 系统信息
gl.set('python',sys.executable) # 系统信息
gl.set('proxy',{'http':proxy,'https':proxy}) # 系统信息
if not os.path.exists("./lock"): # 第一次执行初始化
if not os.path.exists("./tools"):
os.mkdir("./tools")
ini_init() # 创建配置文件
open("./lock","w").close()
dow_rep(down)
Repeater(modular,tool) # 进入中继模块
if __name__ == '__main__':
target = args.target # 目标
modular = args.modular # 模块
tool = args.tool # 工具
output_file = args.output_file # 保存文件
single = args.single # 是否关闭同时扫描
info = args.info # 是否打印info消息
down = args.down # 要下载的工具或者模块
proxy = args.proxy # 要下载的工具或者模块
exclude = handle_exclude_list(args.exclude) # 排除指定工具
print(Get_list()) if args.list else main(target,modular,tool,info,single,exclude,output_file,down,proxy) # 若有-list则打印列表