统一异常处理

This commit is contained in:
shmilylty
2019-12-10 12:12:44 +08:00
parent 0cafe696a6
commit f5d02d74ef
11 changed files with 35 additions and 35 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ class CheckAXFR(Module):
try:
answers = resolver.query(self.domain, "NS")
except Exception as e:
logger.log('ERROR', e)
logger.log('ERROR', e.args)
return
nsservers = [str(answer) for answer in answers]
if not len(nsservers):
+1 -1
View File
@@ -29,7 +29,7 @@ class CheckCert(Module):
sock.connect((self.domain, self.port))
cert_dict = sock.getpeercert()
except Exception as e:
logger.log('ERROR', e)
logger.log('ERROR', e.args)
return
subdomains = utils.match_subdomain(self.domain, str(cert_dict))
self.subdomains = self.subdomains.union(subdomains)