def __init__(self, url, nameserver=None, thread_count=THREAD_COUNT): self.url = UrlParser(url) self.nameserver = nameserver self.thread_count = thread_count self.jobs = Queue() self.threads = [] fuzz = DomainFuzz(self.url.domain) fuzz.generate() self.permutations = fuzz.domains
def get(self, domain): try: url = UrlParser(domain) except ValueError as err: return err, 400 domain_fuzz = DomainFuzz(url.domain) domain_fuzz.generate() return domain_fuzz.domains
def __init__(self, url, nameserver=None, thread_count=THREADS): self.id = str(uuid4()) self.timestamp = int(time()) self.url = UrlParser(url) self.nameserver = nameserver self.thread_count = thread_count self.jobs = Queue() self.threads = [] fuzz = DomainFuzz(self.url.domain, dictionary=DICTIONARY, tld_dictionary=TLD_DICTIONARY) fuzz.generate() self.permutations = fuzz.domains
def checkDomain(self,dnsEntryName): fuzzer = DomainFuzz(dnsEntryName.lower()) fuzzer.generate() domains = fuzzer.domains total_hits = 0 for i in range(0, len(domains)): if module_dnspython: resolv = dns.resolver.Resolver() resolv.lifetime = 1 resolv.timeout = 1 try: ns = resolv.query(domains[i]['domain-name'], 'NS') domains[i]['ns'] = str(ns[0])[:-1].lower() except: pass if 'ns' in domains[i]: try: ns = resolv.query(domains[i]['domain-name'], 'A') domains[i]['a'] = str(ns[0]) except: pass try: ns = resolv.query(domains[i]['domain-name'], 'AAAA') domains[i]['aaaa'] = str(ns[0]) except: pass try: mx = resolv.query(domains[i]['domain-name'], 'MX') domains[i]['mx'] = str(mx[0].exchange)[:-1].lower() except: pass if 'ns' in domains[i] or 'a' in domains[i]: try: whoisdb = whois.query(domains[i]['domain-name']) domains[i]['created'] = str(whoisdb.creation_date).replace(' ', 'T') domains[i]['updated'] = str(whoisdb.last_updated).replace(' ', 'T') except: pass returnDomains = [] for i in domains: info = '' if 'a' in i: info += i['a'] if 'country' in i: info += '/' + i['country'] if 'banner-http' in i: info += ' HTTP:"%s"' % i['banner-http'] elif 'ns' in i: info += 'NS:' + i['ns'] if 'aaaa' in i: info += ' ' + i['aaaa'] if 'mx' in i: info += ' MX:' + i['mx'] if 'banner-smtp' in i: info += ' SMTP:"%s"' % i['banner-smtp'] if 'created' in i and 'updated' in i and i['created'] == i['updated']: info += ' Created/Updated:' + i['created'] else: if 'created' in i: info += ' Created:' + i['created'] if 'updated' in i: info += ' Updated:' + i['updated'] if info: returnDomains.append([i['domain-name'],info]) return returnDomains
def checkDomain(self, dnsEntryName): fuzzer = DomainFuzz(dnsEntryName.lower()) fuzzer.generate() domains = fuzzer.domains total_hits = 0 for i in range(0, len(domains)): if module_dnspython: resolv = dns.resolver.Resolver() resolv.lifetime = 1 resolv.timeout = 1 try: ns = resolv.query(domains[i]['domain-name'], 'NS') domains[i]['ns'] = str(ns[0])[:-1].lower() except: pass if 'ns' in domains[i]: try: ns = resolv.query(domains[i]['domain-name'], 'A') domains[i]['a'] = str(ns[0]) except: pass try: ns = resolv.query(domains[i]['domain-name'], 'AAAA') domains[i]['aaaa'] = str(ns[0]) except: pass try: mx = resolv.query(domains[i]['domain-name'], 'MX') domains[i]['mx'] = str(mx[0].exchange)[:-1].lower() except: pass if 'ns' in domains[i] or 'a' in domains[i]: try: whoisdb = whois.query(domains[i]['domain-name']) domains[i]['created'] = str(whoisdb.creation_date).replace( ' ', 'T') domains[i]['updated'] = str(whoisdb.last_updated).replace( ' ', 'T') except: pass returnDomains = [] for i in domains: info = '' if 'a' in i: info += i['a'] if 'country' in i: info += '/' + i['country'] if 'banner-http' in i: info += ' HTTP:"%s"' % i['banner-http'] elif 'ns' in i: info += 'NS:' + i['ns'] if 'aaaa' in i: info += ' ' + i['aaaa'] if 'mx' in i: info += ' MX:' + i['mx'] if 'banner-smtp' in i: info += ' SMTP:"%s"' % i['banner-smtp'] if 'created' in i and 'updated' in i and i['created'] == i[ 'updated']: info += ' Created/Updated:' + i['created'] else: if 'created' in i: info += ' Created:' + i['created'] if 'updated' in i: info += ' Updated:' + i['updated'] if info: returnDomains.append([i['domain-name'], info]) return returnDomains