This commit is contained in:
Renaud Boyer 2020-12-06 17:59:07 +01:00
parent bcdb4c08d9
commit 1e5185b328
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ def _get_dns_resolver():
def get_ns(hostname) -> [str]:
try:
answers = _get_dns_resolver().resolve(hostname, "NS")
except:
except Exception:
return []
return [a.to_text() for a in answers]
@ -74,7 +74,7 @@ def get_spf_domain(hostname) -> [str]:
parts = record.split(" ")
for part in parts:
if part.startswith(_include_spf):
ret.append(part[part.find(_include_spf) + len(_include_spf) :])
ret.append(part[part.find(_include_spf) + len(_include_spf):])
return ret