hound_db.increase(sql2); time.sleep(0.3) for yuming in ydns: y_ip = function.ip(yuming); hound_db.Domain_storage(url_tables,yuming,y_ip) else: sql = "update %s set dns = 1 where url = '%s'" % (url_tables,url); hound_db.increase(sql); time.sleep(0.3) sql = "select count(*) from %s where recursion != 0 and url = '%s' " % (url_tables,url); if hound_db.query(sql) == 0 : blast.blast_url(url,thread,lis,url_tables); #爆破域名 并且等待结束 sql = "update %s set recursion = 1 where url = '%s'" % (url_tables,url); hound_db.increase(sql); for black_ip in core.Blacklist_ip: sql = "delete from %s where ip = '%s' " % (url_tables,black_ip); hound_db.increase(sql); time.sleep(0.3); if Interface == 'good': #如果调用接口 '''调用接口查询''' i_lis = call_interface.jiekou1(url); #获取接口输出的域名 if len(i_lis) > 1:#如果获取到的域名超过一个的话 is_url = simple(); #new 对象 print '\033[1;32;1m Call interface to get the domain name...√ \033[0m'; time.sleep(1); print '\033[1;32;1m A total of %i domain names \033[0m' % (len(i_lis));
hound_db.increase(sql2) time.sleep(0.3) for yuming in ydns: y_ip = function.ip(yuming) hound_db.Domain_storage(url_tables, yuming, y_ip) else: sql = "update %s set dns = 1 where url = '%s'" % (url_tables, url) hound_db.increase(sql) time.sleep(0.3) sql = "select count(*) from %s where recursion != 0 and url = '%s' " % ( url_tables, url) if hound_db.query(sql) == 0: blast.blast_url(url, thread, lis, url_tables) #爆破域名 并且等待结束 sql = "update %s set recursion = 1 where url = '%s'" % (url_tables, url) hound_db.increase(sql) for black_ip in core.Blacklist_ip: sql = "delete from %s where ip = '%s' " % (url_tables, black_ip) hound_db.increase(sql) time.sleep(0.3) if Interface == 'good': #如果调用接口 '''调用接口查询''' i_lis = call_interface.jiekou1(url) #获取接口输出的域名 if len(i_lis) > 1: #如果获取到的域名超过一个的话 is_url = simple()
ip varchar(40) not null comment 'ip', recursion int not null comment 'digui', Crawler int not null comment 'pachong' )charset utf8 engine = innodb; """ % (url.replace('.','_')) ); try: u_resolver=dns.resolver.Resolver() ip = u_resolver.query(url,'A') if ip[0] : url_ip = ip[0]; except Exception,e: url_ip = "0.0.0.0"; sql = "insert into %s values(null,\"%s\",\"%s\",1,0)" % (url.replace('.','_'),url,url_ip); DB().increase(sql); #入库 blast.blast_url(url,thread,lis); #爆破域名 并且等待结束 if Interface == 'good': #如果调用接口 '''调用接口查询''' from request.call_interface import call_interface; i_lis = call_interface.jiekou1(url); #获取接口输出的域名 if len(i_lis) > 1:#如果获取到的域名超过一个的话 from request.simple import simple; is_url = simple(); #new 对象 print '\033[1;32;1m Call interface to get the domain name...√ \033[0m'; time.sleep(1); print '\033[1;32;1m A total of %i domain names \033[0m' % (len(i_lis)); print '\033[1;32;1m May consume a little time -_- \033[0m' t1 = threading.Thread();
print '\033[1;32;1m Call interface to get the domain name...√ \033[0m'; time.sleep(1); print '\033[1;32;1m A total of %i domain names \033[0m' % (len(i_lis)); print '\033[1;32;1m May consume a little time -_- \033[0m' for u in i_lis: uu = threading.Thread(target=is_url.h_get_isurl,args=[url,u]); #函数名称 uu.start(); tsk.append(uu); for tt in tsk: tt.join(); print '\033[1;32;1m This step is complete, the next to continue。\033[0m'; '''接口调用完毕!''' blast.blast_url(url,thread,lis); #调用万接口后爆破域名 并且等待结束 function.table_print(url.replace('.','_')); #输出表格 time.sleep(3); if recursion != None: #递归爆破 print ' Ready to burst, the need for a certain time! ' while True: sql = "select url from %s where recursion = 0 limit 1" % (url.replace('.','_')); recursion_url = hound_db.query_all(sql); if len(recursion_url) > 0 : blast.recursion_blast_url(url,thread,lis,recursion_url); #查询1数据后进行爆破 并且等待爆破完2条 else: break;
print '\033[1;32;1m A total of %i domain names \033[0m' % ( len(i_lis)) print '\033[1;32;1m May consume a little time -_- \033[0m' for u in i_lis: uu = threading.Thread(target=is_url.h_get_isurl, args=[url, u]) #函数名称 uu.start() tsk.append(uu) for tt in tsk: tt.join() print '\033[1;32;1m This step is complete, the next to continue。\033[0m' '''接口调用完毕!''' blast.blast_url(url, thread, lis) #调用万接口后爆破域名 并且等待结束 function.table_print(url.replace('.', '_')) #输出表格 time.sleep(3) if recursion != None: #递归爆破 print ' Ready to burst, the need for a certain time! ' while True: sql = "select url from %s where recursion = 0 limit 1" % ( url.replace('.', '_')) recursion_url = hound_db.query_all(sql) if len(recursion_url) > 0: