-
Notifications
You must be signed in to change notification settings - Fork 8
/
judge.py
225 lines (174 loc) · 6.87 KB
/
judge.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
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#from collect.search_engine import main
#from lib.choose_model import Big_Category
# from Activelibrary.backgroundscan import mian
class whether():
# 选择使用选择模式
def G_(self,G):
if G==True:
from lib.choose_model import Big_Category
Big_Category.Category()
def GUI(self,Gui):
if Gui==True:
from lib.GUI import cs
# 被动信息收集
# fofa_
def fofa_judge(self,Fofa_Parameter, Cookie):
try:
if Fofa_Parameter != None:
from collect import fofa
fofa.Interface(Fofa_Parameter, Cookie)
except Exception as bc:
print("有错误!错误提示" + str(bc))
def fofa_api_judge(self, Fofa_api_fofaapi, Fofa_api_key,Fofa_api_email,Fofa_api_size):
if Fofa_api_fofaapi != None:
from collect import fofa_api
fofa_api.Interface(Fofa_api_fofaapi,Fofa_api_key,Fofa_api_email,Fofa_api_size)
#print(Fofa_api_size)
#print(Fofa_api_fofaapi)
# shodan搜索
def shodan_judge(self,Shodan_Parameter, api):
# try:
if Shodan_Parameter != None:
from collect import shodan
shodan.shod(Shodan_Parameter, api)
# except Exception as bc:
# print("有错误!错误提示" + str(bc))
# whois查询
def whois_judge(self,whois_Parameter,args):
try:
if whois_Parameter != None:
from collect import req_whois
req_whois.Interface(args)
except Exception as bc:
print("有错误!错误提示" + str(bc))
# bing提取
def google_judge(self,google_Parameter,args):
if google_Parameter !=None:
from collect import bing
bing.Interface(args)
# dns
def SubDNS_judge(self,SubDNS_Parameter,args):
if SubDNS_Parameter!=None:
from collect.SubDnsDetect import SubDns
#print(SubDNS_Parameter)
SubDns.DNS_Interface(args)
# Google
def Google_judge(self,SubDNS_Parameter,args):
if SubDNS_Parameter!=None:
from collect import google
#print(SubDNS_Parameter)
google.Interface(args)
# # 主动信息收集
# cms识别
def CmsVulScan_judge(self,Cms_Parameter):
try:
if Cms_Parameter!=None:
from thirdparty.CmsVulScan import CmsVulScan
CmsVulScan.Interface(Cms_Parameter)
except Exception as bc:
print("有错误!错误提示" + str(bc))
# 备份文件扫描
def BP_judge(self,BP,BPm,args):
#try:
if BP != None: # 单个扫描
from Initiative.Backupfilescan import ProbeBackup
ProbeBackup.Interface(args)
elif BPm!=None: # 批量扫描
from Initiative.Backupfilescan import ProbeBackup
ProbeBackup.Interface(args)
# except Exception as bc:
# print("有错误!错误提示" + str(bc))
# 后台扫描
def BK_judge(self,BK,BKm,args):
# try:
if BK != None:
from Initiative.backgroundscan import back
back.Interfacemian(args)
elif BKm != None: # 批量扫描
from Initiative.backgroundscan import back
back.Interfacemian(args)
# except Exception as bc:
# print("有错误!错误提示" + str(bc))
# 端口扫描
def PS_judge(self,PS,args):
try:
if PS != None:
from Initiative.portscan import port
port.Interface(args)
except Exception as bc:
print("有错误!错误提示" + str(bc))
# 暴力破解
# 登录界面爆破
def webcrack_judge(self,Crack_Parameter):
try:
if Crack_Parameter!=None:
from thirdparty.extracted import webcrack
webcrack.Interface(Crack_Parameter)
except Exception as bc:
print("有错误!错误提示" + str(bc))
#
# Ftp爆破
def ftp_judge(self,Ftpcrack_Parameter,args):
#try:
if Ftpcrack_Parameter !=None:
from blasting.ftp_blasting import ftp
ftp.fill_in(args)
# except Exception as bc:
# print("有错误!错误提示" + str(bc))
# ssh爆破
def ssh_judge(self,ssh_crack,args):
try:
if ssh_crack !=None:
from blasting.ssh_blasting import ssh
#print(ssh_crack)
ssh.Interface(args)
except Exception as bc:
print("有错误!错误提示" + str(bc))
def mysql_judge(self,mysql,args):
if mysql != None:
from blasting.mysql_blasting import mysql
# print(ssh_crack)
mysql.Interface(args)
# # 其他
# 端口对应服务查询
def portquery_judge(self,Portquery_Parameter,args):
if Portquery_Parameter!=None:
from other.portquery import potrquery
potrquery.Interfacemian(args)
# 文件的中的域名提取
def Contentextraction_judge(self,mdns_Parameter, mhttp_Parameter):
# 光提取文件中的域名/IP、比如文件有一个http://1.1.1.1/x/x/x/x、提取出来的就是1.1.1.1
if mdns_Parameter != None:
from other.Contentextraction import extraction
extraction.Interface_dns(mdns_Parameter)
# 取文件中的和[http/https://]+域名、比如文件有一个http://1.1.1.1/x/x/x/x、提取出来的就是http://1.1.1.1
elif mhttp_Parameter!=None:
from other.Contentextraction import extraction
extraction.Interface_http(mhttp_Parameter)
# def Acting_judge(self,PSC_Parameter):
# from other.acting import Agentmian
# if PSC_Parameter != False:
# print("dsads")
# POC/EXP
def PE_judge(self,PEP_Parameter,refresh_Paramete,reset_Paramete,args):
if PEP_Parameter!=False: #使用POC/EXP
from PocAndExpScript import storage # 调用
storage.whether(args)
elif refresh_Paramete!=False: # 更新POC/EXP
from PocAndExpScript import main
main.Interface()
elif reset_Paramete!=False: # 重置
from PocAndExpScript import main
main.default()
# 漏洞扫描
def Rad_Xray(self,RXURL,MRX,RXDD):
if RXURL != None:
from leakscan.rad_xray_py import rad_xray
rad_xray.main(RXURL,MRX,RXDD)
elif MRX !=None:
from leakscan.rad_xray_py import rad_xray
rad_xray.main(RXURL,MRX,RXDD)
def Python_Awvs(self,AwvsUrl,AwvsAPI,AwvsFile,AwvsVelocity,AwvsTime,AwvsName,AwvsProxyIP,AwvsProxyPort,AwvsDingtalk):
if AwvsUrl !=None:
from leakscan.awvs import python_awvs
python_awvs.mian(AwvsUrl,AwvsAPI,AwvsFile,AwvsVelocity,AwvsTime,AwvsName,AwvsProxyIP,AwvsProxyPort,AwvsDingtalk)