verify: allow cdnlist to override nxdomain (some domains have false nxdomain reports on bare domain)
This commit is contained in:
parent
e841cdc2f6
commit
e3ff01f3db
|
@ -3,3 +3,6 @@ www.gov.cn
|
|||
a1.cdn-hotels.com
|
||||
cdn.jsdelivr.net
|
||||
edge.yunjiasu.com
|
||||
www.travelsky.net
|
||||
www.xiumu.org
|
||||
www.igoldhk.com
|
|
@ -89,10 +89,11 @@ class ChinaListVerify(object):
|
|||
|
||||
def check_domain(self, domain):
|
||||
nameservers = []
|
||||
nxdomain = False
|
||||
try:
|
||||
answers = dns.resolver.query(domain, 'NS')
|
||||
except dns.resolver.NXDOMAIN:
|
||||
raise NXDOMAIN
|
||||
nxdomain = True
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
|
@ -111,6 +112,9 @@ class ChinaListVerify(object):
|
|||
if testdomain.endswith(domain):
|
||||
self.check_cdnlist(testdomain)
|
||||
|
||||
if nxdomain:
|
||||
raise NXDOMAIN
|
||||
|
||||
self.check_blacklist(nameservers)
|
||||
|
||||
for nameserver in nameservers:
|
||||
|
|
Loading…
Reference in New Issue