mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-25 00:56:14 +08:00
set使用update
This commit is contained in:
@@ -81,7 +81,7 @@ class CloudFlareAPI(Query):
|
||||
f'{list_dns_resp.status_code} {list_dns_resp.text}')
|
||||
return
|
||||
subdomains = self.match_subdomains(list_dns_resp.text)
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
if not self.subdomains:
|
||||
# waiting for cloudflare enumerate subdomains
|
||||
sleep(5)
|
||||
@@ -96,7 +96,7 @@ class CloudFlareAPI(Query):
|
||||
return
|
||||
total_pages = list_dns_resp.json()['result_info']['total_pages']
|
||||
subdomains = (self.match_subdomains(list_dns_resp.text))
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
page += 1
|
||||
if page > total_pages:
|
||||
break
|
||||
|
||||
@@ -35,7 +35,7 @@ class IPv4InfoAPI(Query):
|
||||
subdomains = self.match_subdomains(str(json))
|
||||
if not subdomains:
|
||||
break
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
# 不直接使用subdomains是因为可能里面会出现不符合标准的子域名
|
||||
subdomains = json.get('Subdomains')
|
||||
if subdomains and len(subdomains) < 300:
|
||||
|
||||
@@ -50,7 +50,7 @@ class NetCraft(Query):
|
||||
subdomains = self.match_subdomains(resp)
|
||||
if not subdomains: # 搜索没有发现子域名则停止搜索
|
||||
break
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
if 'Next Page' not in resp.text: # 搜索页面没有出现下一页时停止搜索
|
||||
break
|
||||
last = re.search(r'&last=.*' + self.domain, resp.text).group(0)
|
||||
|
||||
@@ -28,7 +28,7 @@ class QianXun(Query):
|
||||
subdomains = self.match_subdomains(resp)
|
||||
if not subdomains: # 没有发现子域名则停止查询
|
||||
break
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
if '<div id="page" class="pagelist">' not in resp.text:
|
||||
break
|
||||
if '<li class="disabled"><span>»</span></li>' in resp.text:
|
||||
|
||||
@@ -26,7 +26,7 @@ class SecurityTrailsAPI(Query):
|
||||
prefixs = resp.json()['subdomains']
|
||||
subdomains = [f'{prefix}.{self.domain}' for prefix in prefixs]
|
||||
if subdomains:
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
|
||||
@@ -25,7 +25,7 @@ class SiteDossier(Query):
|
||||
subdomains = self.match_subdomains(resp)
|
||||
if not subdomains: # 没有发现子域名则停止查询
|
||||
break
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
# 搜索页面没有出现下一页时停止搜索
|
||||
if 'Show next 100 items' not in resp.text:
|
||||
break
|
||||
|
||||
@@ -29,7 +29,7 @@ class SpyseAPI(Query):
|
||||
subdomains = self.match_subdomains(str(json))
|
||||
if not subdomains: # 没有发现子域名则停止查询
|
||||
break
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
offset += limit
|
||||
if len(json.get('data').get('items')) < limit:
|
||||
break
|
||||
|
||||
@@ -26,7 +26,7 @@ class ThreatCrowd(Query):
|
||||
if resp.status_code != 200:
|
||||
return
|
||||
subdomains = self.match_subdomains(resp.text)
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
|
||||
@@ -34,7 +34,7 @@ class WZPCQuery(Query):
|
||||
subdomains = self.match_subdomains(resp.text)
|
||||
if not subdomains: # 没有发现子域名则停止查询
|
||||
break
|
||||
self.subdomains = self.subdomains.union(subdomains)
|
||||
self.subdomains.update(subdomains)
|
||||
if not subdomains:
|
||||
break
|
||||
if page_num > 10:
|
||||
|
||||
Reference in New Issue
Block a user