hound_db = DB(); blast = blast(); if Dictionaries: #批量导入字典 function.process(hound_db.Dictionaries,Dictionaries); elif imurl and len(imurl) == 2: #导入域名 function.im_url(imurl[0],imurl[1]) elif url: if picture == 1: function.a1(); elif picture == 2: function.a2(); elif picture == 3: function.a3(); elif picture == 4: function.a4(); lis = hound_db.query_all("select lis from lis"); #获取所有字典数据 print "\033[1;35;1m Dictionary--> %i Tools--> hound version--> 1.7 \033[0m \n" % (len(lis)); url = url.replace('http://','').replace('https://',''); #处理域名 url_tables = url.replace('.','_').replace('-','_'); sql = "select count(table_name) from information_schema.tables where table_name = '%s' and TABLE_SCHEMA = '%s'" % (url_tables,core.CORE.db) if not hound_db.query(sql): #判断表名存不存在 如果不存在就创建 hound_db.increase(""" create table %s( id int not null primary key auto_increment, url text not null comment 'url', ip varchar(40) not null comment 'ip', recursion int not null comment 'digui', Crawler int not null comment 'pachong',
hound_db = DB() blast = blast() if Dictionaries: #批量导入字典 function.process(hound_db.Dictionaries, Dictionaries) elif imurl and len(imurl) == 2: #导入域名 function.im_url(imurl[0], imurl[1]) elif url: if picture == 1: function.a1() elif picture == 2: function.a2() elif picture == 3: function.a3() elif picture == 4: function.a4() lis = hound_db.query_all("select lis from lis") #获取所有字典数据 print "\033[1;35;1m Dictionary--> %i Tools--> hound version--> 1.7 \033[0m \n" % ( len(lis)) url = url.replace('http://', '').replace('https://', '') #处理域名 url_tables = url.replace('.', '_').replace('-', '_') sql = "select count(table_name) from information_schema.tables where table_name = '%s' and TABLE_SCHEMA = '%s'" % ( url_tables, core.CORE.db) if not hound_db.query(sql): #判断表名存不存在 如果不存在就创建 hound_db.increase(""" create table %s( id int not null primary key auto_increment,