DNS/実装/python/dnslib/lame_check/check.pyについて、ここに記述してください。
1 import TLD
2 tldns = TLD.TLD()
3
4 from Get_ns import get_ns, checkns
5
6 import fileinput
7 for line in fileinput.input(): # domain candidate
8 if line[0] == "#" : continue
9 d = line[:-1]
10 tld_a = tldns.getaddress(d) # get some tld server A
11 nslist = tldns.delegation(tld_a,d).keys() # delegation
12
13 if nslist: # not empty
14 checkns(d, set(nslist)) # check delegation