修改为响应状态码判断

This commit is contained in:
shmilylty
2019-12-10 22:06:21 +08:00
parent 00928c367a
commit d8aa7487d2
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class BufferOver(Query):
except Exception as e:
logger.log('ERROR', e.args)
return
if not resp:
if resp.status_code != 200:
return
subdomains = self.match(self.domain, str(resp.json()))
# 合并搜索子域名搜索结果
+2 -2
View File
@@ -23,7 +23,7 @@ class ThreatCrowd(Query):
except Exception as e:
logger.log('ERROR', e.args)
return
if not resp:
if resp.status_code != 200:
return
subdomains = self.match(self.domain, str(resp.json()))
# 合并搜索子域名搜索结果
@@ -52,4 +52,4 @@ def do(domain): # 统一入口名字 方便多线程调用
if __name__ == '__main__':
do('example.com')
do('mi.com')