请求子域返回状态码为400的暂时标记为无效子域

This commit is contained in:
shmilylty
2019-10-22 23:49:29 +08:00
parent 6f0cb70e02
commit 0e4c7961fe
+2 -2
View File
@@ -39,7 +39,7 @@ def get_ports(port):
def gen_new_datas(datas, ports):
logger.log('INFOR', f'正在生成请求地址')
new_datas = []
protocols = ['http://']
protocols = ['http://', 'https://']
for data in datas:
valid = data.get('valid')
if valid is None: # 子域有效性未知的才进行http请求探测
@@ -132,7 +132,7 @@ def request_callback(future, index, datas):
resp, text = result
datas[index]['reason'] = resp.reason
datas[index]['status'] = resp.status
if resp.status >= 500:
if resp.status == 400 or resp.status >= 500:
datas[index]['valid'] = 0
else:
datas[index]['valid'] = 1