set使用update

This commit is contained in:
Jing Ling
2020-08-20 14:01:17 +08:00
parent f8f3ad0352
commit e056834f1d
38 changed files with 42 additions and 41 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class CheckAXFR(Module):
for name in names:
full_domain = str(name) + '.' + self.domain
subdomain = self.match_subdomains(full_domain)
self.subdomains = self.subdomains.union(subdomain)
self.subdomains.update(subdomain)
record = zone[name].to_text(name)
self.results.append(record)
if self.results:
+1 -1
View File
@@ -32,7 +32,7 @@ class CheckCert(Module):
logger.log('DEBUG', e.args)
return
subdomains = self.match_subdomains(str(cert_dict))
self.subdomains = self.subdomains.union(subdomains)
self.subdomains.update(subdomains)
def run(self):
"""
+1 -1
View File
@@ -23,7 +23,7 @@ class CheckNSEC(Module):
record = item.to_text()
subdomains = self.match_subdomains(record)
subdomain = ''.join(subdomains) # 其实这里的subdomains的长度为1 也就是说只会有一个子域
self.subdomains = self.subdomains.union(subdomains)
self.subdomains.update(subdomains)
self.gen_record(subdomains, record)
if subdomain == self.domain: # 当查出子域为主域 说明完成了一个循环 不再继续查询
break