用python查找未注册的域名,python查找未注册,扫描看看哪些域名没有被注


扫描看看哪些域名没有被注册,适用于Python2.7,用python查找未注册的域名,目前扫描出来的4位的还没有注册的有
aag6、aah6、aan6、aaq2、aaq4、aar9、aay4、aa0z、aa1x、aa2j、aa3p、aa8y、aa-f、aa-l、aa-q、aa-u、aa-v、aa-4、aa-5、aa-9、abd9等<用python查找未注册的域名>

1.[代码][Python]代码

#-*- encoding: utf-8 -*-  import sysreload(sys)sys.setdefaultencoding("utf-8")import urllibimport urllib2import time, threadingl='abcdefghijklmnopqrstuvwxyz0123456789-'fl=open('d:\\reg.txt','a')#step是上次扫描到的位置step='aao9't=Falsefor i in l:for j in l:for k in l:for m in l:if i=='-':continueif m=='-':continues=i+j+k+mif s==step:t=Trueif t==True:url = 'http://vip.regsky.com/reg/domainquery.asp?domainname='+s+'%2Ecom'response = urllib2.urlopen(url)the_page = response.read()if the_page=='Y':print s+":Not reged!"f=open('c:\\reg.txt','a')f.write(s+" :Not reged!\r\n")f.close()else:print s +": Reged!"fl.write(s +": Reged!\r\n")#线程休息3秒钟,别被服务器屏蔽了time.sleep(3)fl.close()

编橙之家文章,

评论关闭