-
Notifications
You must be signed in to change notification settings - Fork 113
/
type.go
199 lines (168 loc) · 5.98 KB
/
type.go
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
package conf
/**
@author yhy
@since 2023/11/15
@desc 注意 json 别名不能是_ - viper 好像不识别这种的,最好是驼峰式
**/
type Config struct {
Debug bool `json:"debug"`
Options Options `json:"options"`
Passive Passive `json:"passive"`
Http Http `json:"http"`
Plugins Plugins `json:"plugins"`
WebScan WebScan `json:"webScan"`
NoPortScan bool `json:"no_port_scan"`
Reverse Reverse `json:"reverse"`
SqlmapApi Sqlmap `json:"sqlmapApi"`
Mitmproxy Mitmproxy `json:"mitmproxy"`
Collection Collection `json:"collection"`
}
type WebScan struct {
Poc []string `json:"poc"`
Craw string `json:"craw"`
Show bool `json:"show"`
}
type Options struct {
Target string // target URLs/hosts to scan
TargetFile string
Targets []string
Output string
Mode string
S2 S2
Shiro Shiro
}
type Http struct {
Proxy string `json:"proxy"` // 漏洞扫描时使用的代理,如: http://127.0.0.1:8080
Timeout int `json:"timeout"` // 建立 tcp 连接的超时时间
MaxConnsPerHost int `json:"maxConnsPerHost"` // 每个 host 最大连接数
RetryTimes int `json:"retryTimes"` // 请求失败的重试次数,0 则不重试
AllowRedirect int `json:"allowRedirect"` // 单个请求最大允许的跳转数,0 则不跳转
VerifySSL bool `json:"verifySSL"` // 是否验证 ssl 证书
MaxQps int `json:"maxQps"` // 每秒最大请求数
Headers map[string]string `json:"headers"` // 指定 http 请求头
ForceHTTP1 bool `json:"forceHTTP1"` // 强制指定使用 http/1.1
}
type Passive struct {
ProxyPort string `mapstructure:"port" json:"port"`
WebPort string `mapstructure:"webPort" json:"webPort"`
WebUser string `mapstructure:"webUser" json:"webUser"`
WebPass string `mapstructure:"webPass" json:"webPass"`
}
type S2 struct {
Mode string
Name string
Body string
CMD string
ContentType string
}
type Shiro struct {
Mode string
Cookie string
Platform string
Key string
KeyMode string
Gadget string
CMD string
Echo string
}
// Plugins 插件配置
type Plugins struct {
BruteForce struct {
Web bool `json:"web"`
Service bool `json:"service"`
UsernameDictionary string `json:"usernameDict"`
PasswordDictionary string `json:"passwordDict"`
} `json:"bruteForce"`
CmdInjection struct {
Enabled bool `json:"enabled"`
} `json:"cmdInjection"`
CrlfInjection struct {
Enabled bool `json:"enabled"`
} `json:"crlfInjection"`
XSS struct {
Enabled bool `json:"enabled"`
DetectXssInCookie bool `json:"detectXssInCookie"`
} `json:"xss"`
Sql struct {
Enabled bool `json:"enabled"`
BooleanBasedDetection bool `json:"booleanBasedDetection"`
TimeBasedDetection bool `json:"timeBasedDetection"`
ErrorBasedDetection bool `json:"errorBasedDetection"`
DetectInCookie bool `json:"detectInCookie"`
} `json:"sql"`
SqlmapApi Sqlmap `json:"sqlmapApi"`
XXE struct {
Enabled bool `json:"enabled"`
} `json:"xxe"`
SSRF struct {
Enabled bool `json:"enabled"`
} `json:"ssrf"`
BBscan struct {
Enabled bool `json:"enabled"`
} `json:"bbscan"`
Jsonp struct {
Enabled bool `json:"enabled"`
} `json:"jsonp"`
Log4j struct {
Enabled bool `json:"enabled"`
} `json:"log4j"`
ByPass403 struct {
Enabled bool `json:"enabled"`
} `json:"bypass403"`
Fastjson struct {
Enabled bool `json:"enabled"`
} `json:"fastjson"`
NginxAliasTraversal struct {
Enabled bool `json:"enabled"`
} `json:"nginxAliasTraversal"`
Poc struct {
Enabled bool `json:"enabled"`
} `json:"poc"`
Nuclei struct {
Enabled bool `json:"enabled"`
} `json:"nuclei"`
Archive struct {
Enabled bool `json:"enabled"`
} `json:"archive"`
IIS struct {
Enabled bool `json:"enabled"`
} `json:"iis"`
PortScan struct {
Enabled bool `json:"enabled"`
} `json:"portScan"`
}
// Reverse dnslog 配置,使用 dig.pm https://github.com/yumusb/DNSLog-Platform-Golang
type Reverse struct {
Host string `json:"host"`
Domain string `json:"domain"`
}
// Sqlmap Sqlmap API 配置
type Sqlmap struct {
Enabled bool `json:"enabled"` // 是否开启 sqlmap api
Url string `json:"url"` // SQLMap API 服务器地址
Username string `json:"username"` // SQLMap API 用户名
Password string `json:"password"` // SQLMap API 密码
}
// Collection 信息收集中的正则
type Collection struct {
Domain []string `json:"domain"`
IP []string `json:"ip"`
Phone []string `json:"phone"`
Email []string `json:"email"`
IDCard []string `json:"idCard"`
API []string `json:"api"`
Url []string `json:"url"`
UrlFilter []string `json:"urlFilter"`
Other []string `json:"other"`
SensitiveParameters []string `json:"sensitive_parameters"`
}
type Mitmproxy struct {
BasicAuth struct {
Username string `json:"username"`
Password string `json:"password"`
Header string `json:"header"`
} `json:"basicAuth"`
Exclude []string `json:"exclude"` // Exclude 排除扫描的域名
Include []string `json:"include"` // Include 只扫描的域名
FilterSuffix string `json:"filterSuffix"` // 排除的后缀
}