mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-28 11:45:52 +08:00
请求子域返回状态码为400的暂时标记为无效子域
This commit is contained in:
@@ -39,7 +39,7 @@ def get_ports(port):
|
|||||||
def gen_new_datas(datas, ports):
|
def gen_new_datas(datas, ports):
|
||||||
logger.log('INFOR', f'正在生成请求地址')
|
logger.log('INFOR', f'正在生成请求地址')
|
||||||
new_datas = []
|
new_datas = []
|
||||||
protocols = ['http://']
|
protocols = ['http://', 'https://']
|
||||||
for data in datas:
|
for data in datas:
|
||||||
valid = data.get('valid')
|
valid = data.get('valid')
|
||||||
if valid is None: # 子域有效性未知的才进行http请求探测
|
if valid is None: # 子域有效性未知的才进行http请求探测
|
||||||
@@ -132,7 +132,7 @@ def request_callback(future, index, datas):
|
|||||||
resp, text = result
|
resp, text = result
|
||||||
datas[index]['reason'] = resp.reason
|
datas[index]['reason'] = resp.reason
|
||||||
datas[index]['status'] = resp.status
|
datas[index]['status'] = resp.status
|
||||||
if resp.status >= 500:
|
if resp.status == 400 or resp.status >= 500:
|
||||||
datas[index]['valid'] = 0
|
datas[index]['valid'] = 0
|
||||||
else:
|
else:
|
||||||
datas[index]['valid'] = 1
|
datas[index]['valid'] = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user