def output(target): if hasattr(target, 'iscdn') and not target.iscdn and target.f_domain: threadl = jsons = [] threads = 5 # 线程数 queue = Queue.Queue() print_color('find domain in same IP for %s..' % target.ip, 2) code, content = get('dns.aizhan.com', '/index.php?r=index/pages&q=%s' % target.f_domain) match = re.search('1/(\d{1,})', content) page = int(match.group(1)) if match else 1 # 多线程翻页获取同IP域名, [ queue.put('/index.php?r=index/getress&q=%s&page=%d' % (target.f_domain, i)) for i in xrange(1, page + 1) ] threadl = [tThread(queue, jsons) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] #Ping IP [queue.put(json['domain']) for json in jsons] threadl = [tPing(queue, target.ip) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] print('')
def output(target): if hasattr(target, 'mail'): print_color('whois same mail %s domain ...' % target.mail, 2) threadl = [] threads = 5 queue = Queue.Queue() try: code, content = get('whois.aizhan.com', '/reverse-whois/?q=%s&t=email' % target.mail) domain_list = findall(r'_blank">(.*?)</a></td>', content) if len(domain_list): [ queue.put(domain) for domain in domain_list if domain != target.n_domain ] threadl = [tPing(queue, target.ip) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] except: log.exception('exception') print_color(__name__ + ' faild', 0) print('')
def output(target): if hasattr(target,'iscdn') and not target.iscdn and target.f_domain: threadl = jsons = []; threads = 5 # 线程数 queue=Queue.Queue() print_color('find domain in same IP for %s..'%target.ip, 2) code,content = get('dns.aizhan.com','/index.php?r=index/pages&q=%s' % target.f_domain) match = re.search('1/(\d{1,})', content) page = int(match.group(1)) if match else 1 # 多线程翻页获取同IP域名, [queue.put('/index.php?r=index/getress&q=%s&page=%d' % (target.f_domain,i)) for i in xrange(1,page+1)] threadl = [tThread(queue,jsons) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] #Ping IP [queue.put(json['domain']) for json in jsons] threadl = [tPing(queue,target.ip) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] print('')
def output(target): if hasattr(target, "axfr") and not target.axfr and target.n_domain: threadl = [] threads = 5 queue = Queue.Queue() apis = [ { "domain": "www.baidu.com", "path": "/s?wd=site:%s&pn=0&ie=utf-8" % target.n_domain, "method": "get", "regex": '"g">(.*?)%s' % target.n_domain, }, { "domain": "i.links.cn", "path": "/subdomain/", "method": "post", "regex": "target=_blank>http://(.*)%s", "data": {"domain": target.n_domain, "b2": "1", "b3": "1", "b4": "1"}, }, { "domain": "www.alexa.com", "path": "/siteinfo/%s" % target.n_domain, "method": "get", "regex": "word-wrap'>(.*?)%s" % target.n_domain, }, ] print_color("find subdomain for %s.." % target.n_domain, 2) pix_list = [] try: for api in apis: try: if api["method"] == "get": code, content = get(api["domain"], api["path"]) pix_list += findall(api["regex"], content) elif api["method"] == "post": code, content = post(api["domain"], api["path"], api["data"]) pix_list += findall(api["regex"], content) except: print_color(api["domain"] + " Faild", 0) pix_list = {}.fromkeys(pix_list).keys() for pix in pix_list: queue.put("%s%s" % (pix, target.n_domain)) threadl = [tPing(queue, target.ip) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] except: log.exception("exception") print_color(__name__ + " faild", 0) print("")
def output(target): if hasattr(target,'mail'): print_color('whois same mail %s domain ...' % target.mail, 2) threadl = []; threads = 5 queue = Queue.Queue() try: code,content = get('whois.aizhan.com', '/reverse-whois/?q=%s&t=email' % target.mail) domain_list = findall(r'_blank">(.*?)</a></td>', content) if len(domain_list): [queue.put(domain) for domain in domain_list if domain != target.n_domain] threadl = [tPing(queue,target.ip) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] except: log.exception('exception') print_color(__name__+' faild', 0) print('')
def output(target): if hasattr(target, 'axfr') and not target.axfr and target.n_domain: threadl = [] threads = 5 queue = Queue.Queue() apis = [{ 'domain': 'www.baidu.com', 'path': '/s?wd=site:%s&pn=0&ie=utf-8' % target.n_domain, 'method': 'get', 'regex': '"g">(.*?)%s' % target.n_domain }, { 'domain': 'i.links.cn', 'path': '/subdomain/', 'method': 'post', 'regex': 'target=_blank>http://(.*)%s', 'data': { 'domain': target.n_domain, 'b2': '1', 'b3': '1', 'b4': '1' } }, { 'domain': 'www.alexa.com', 'path': '/siteinfo/%s' % target.n_domain, 'method': 'get', 'regex': "word-wrap'>(.*?)%s" % target.n_domain }] print_color('find subdomain for %s..' % target.n_domain, 2) pix_list = [] try: for api in apis: try: if api['method'] == 'get': code, content = get(api['domain'], api['path']) pix_list += findall(api['regex'], content) elif api['method'] == 'post': code, content = post(api['domain'], api['path'], api['data']) pix_list += findall(api['regex'], content) except: print_color(api['domain'] + ' Faild', 0) pix_list = {}.fromkeys(pix_list).keys() for pix in pix_list: queue.put('%s%s' % (pix, target.n_domain)) threadl = [tPing(queue, target.ip) for x in xrange(0, threads)] [t.start() for t in threadl] [t.join() for t in threadl] except: log.exception('exception') print_color(__name__ + ' faild', 0) print('')