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