MoinQ:

DNS/実装/python/dnslib/lame_check/cf.pyについて、ここに記述してください。

   1 #python3
   2 import TLD
   3 from CF import CFH
   4 
   5 tldns = TLD.TLD()
   6 
   7 cf = CFH()
   8 print ('cf ns#', len(cf.cf_ns))
   9 
  10 import fileinput
  11 for line in fileinput.input():     # domain candidate
  12     if line[0] == "#" : continue
  13     d = line[:-1]
  14     tld_a = tldns.getaddress(d)  # get some tld server A
  15     nslist = tldns.delegation(tld_a,d).keys() # delegation
  16 
  17     if nslist:    # not empty
  18        cf.checkns(d, set(nslist))  # check delegation   

MoinQ: DNS/実装/python/dnslib/lame_check/cf.py (last edited 2021-03-04 15:06:15 by ToshinoriMaeno)