mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
模块优化
This commit is contained in:
@@ -58,7 +58,6 @@ class Baidu(Search):
|
||||
if not full_search and subdomains.issubset(self.subdomains):
|
||||
# 在全搜索过程中发现搜索出的结果有完全重复的结果就停止搜索
|
||||
break
|
||||
# 合并搜索子域名搜索结果
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.page_num += self.per_page_num
|
||||
# 搜索页面没有出现下一页时停止搜索
|
||||
|
||||
@@ -42,7 +42,6 @@ class Bing(Search):
|
||||
if not full_search and subdomains.issubset(self.subdomains):
|
||||
# 在全搜索过程中发现搜索出的结果有完全重复的结果就停止搜索
|
||||
break
|
||||
# 合并搜索子域名搜索结果
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
# 搜索页面没有出现下一页时停止搜索
|
||||
if '<div class="sw_next">' not in resp.text:
|
||||
|
||||
@@ -34,15 +34,12 @@ class BingAPI(Search):
|
||||
'count': self.per_page_num,
|
||||
'offset': self.page_num}
|
||||
resp = self.get(self.addr, params)
|
||||
if not resp:
|
||||
return
|
||||
subdomains = self.match_subdomains(resp.text)
|
||||
subdomains = self.match_subdomains(resp)
|
||||
if not subdomains: # 搜索没有发现子域名则停止搜索
|
||||
break
|
||||
if not full_search and subdomains.issubset(self.subdomains):
|
||||
# 在全搜索过程中发现搜索出的结果有完全重复的结果就停止搜索
|
||||
break
|
||||
# 合并搜索子域名搜索结果
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.page_num += self.per_page_num
|
||||
if self.page_num >= self.limit_num: # 搜索条数限制
|
||||
|
||||
@@ -33,9 +33,7 @@ class GoogleAPI(Search):
|
||||
'q': word, 'fields': 'items/link',
|
||||
'start': self.page_num, 'num': self.per_page_num}
|
||||
resp = self.get(self.addr, params)
|
||||
if not resp:
|
||||
return
|
||||
subdomains = self.match_subdomains(resp.text)
|
||||
subdomains = self.match_subdomains(resp)
|
||||
if not subdomains:
|
||||
break
|
||||
if not full_search and subdomains.issubset(self.subdomains):
|
||||
|
||||
@@ -23,9 +23,7 @@ class ShodanAPI(Search):
|
||||
params = {'key': self.key, 'page': page, 'query': query,
|
||||
'minify': True, 'facets': {'hostnames'}}
|
||||
resp = self.get(self.addr, params)
|
||||
if not resp:
|
||||
return
|
||||
subdomains = self.match_subdomains(resp.text)
|
||||
subdomains = self.match_subdomains(resp)
|
||||
if not subdomains: # 搜索没有发现子域名则停止搜索
|
||||
break
|
||||
if subdomains:
|
||||
|
||||
@@ -42,7 +42,6 @@ class Yahoo(Search):
|
||||
if not full_search and subdomains.issubset(self.subdomains):
|
||||
# 在全搜索过程中发现搜索出的结果有完全重复的结果就停止搜索
|
||||
break
|
||||
# 合并搜索子域名搜索结果
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
if '>Next</a>' not in resp.text: # 搜索页面没有出现下一页时停止搜索
|
||||
break
|
||||
|
||||
@@ -42,7 +42,6 @@ class Yandex(Search):
|
||||
if not full_search and subdomains.issubset(self.subdomains):
|
||||
# 在全搜索过程中发现搜索出的结果有完全重复的结果就停止搜索
|
||||
break
|
||||
# 合并搜索子域名搜索结果
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
if '>next</a>' not in resp.text: # 搜索页面没有出现下一页时停止搜索
|
||||
break
|
||||
|
||||
@@ -46,9 +46,7 @@ class ZoomEyeAPI(Search):
|
||||
self.header.update({'Authorization': 'JWT ' + access_token})
|
||||
params = {'query': 'hostname:' + self.domain, 'page': page_num}
|
||||
resp = self.get(self.addr, params)
|
||||
if not resp:
|
||||
return
|
||||
subdomains = self.match_subdomains(resp.text)
|
||||
subdomains = self.match_subdomains(resp)
|
||||
if not subdomains: # 搜索没有发现子域名则停止搜索
|
||||
break
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
|
||||
Reference in New Issue
Block a user