Commit e3ff01f3 authored by Felix Yan's avatar Felix Yan

verify: allow cdnlist to override nxdomain (some domains have false nxdomain...

verify: allow cdnlist to override nxdomain (some domains have false nxdomain reports on bare domain)
parent e841cdc2
......@@ -2,4 +2,7 @@ www.azure.cn.mschcdn.com
www.gov.cn
a1.cdn-hotels.com
cdn.jsdelivr.net
edge.yunjiasu.com
\ No newline at end of file
edge.yunjiasu.com
www.travelsky.net
www.xiumu.org
www.igoldhk.com
\ No newline at end of file
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment