Пример #1
0
 def run(self):
     link = "https://dns.bufferover.run/dns?q=.{}".format(self.target)
     try:
         resp = get_request(link, self.timeout)
         if resp.text and resp.status_code == 200:
             data = resp.json()
             for line in data['FDNS_A']:
                 try:
                     sub = line.split(",")[1]
                     self.handler.sub_handler({
                         'Name': sub,
                         'Source': self.name
                     })
                 except:
                     pass
             for line in data['RDNS']:
                 try:
                     sub = line.split(",")[1]
                     self.handler.sub_handler({
                         'Name': sub,
                         'Source': 'DNSBufferOverRun'
                     })
                 except:
                     pass
     except:
         pass
Пример #2
0
 def run(self):
     link = "https://www.threatcrowd.org/searchApi/v2/domain/report/?domain={}".format(self.target)
     try:
         resp = get_request(link, self.timeout)
         if resp.text and resp.status_code == 200:
             for sub in resp.json()['subdomains']:
                 self.handler.sub_handler({'Name': sub, 'Source': self.name})
     except:
         pass
Пример #3
0
 def run(self):
     link = "https://crt.sh/?q=%25.{}&output=json".format(self.target)
     try:
         resp = get_request(link, self.timeout)
         if resp.text and resp.status_code == 200:
             for data in resp.json():
                 sub = data['name_value']
                 for xsub in sub.split('\n'):
                     self.handler.sub_handler({'Name': xsub, 'Source': self.name})
     except:
         pass
Пример #4
0
 def site_search(self, search_engine, count, site):
     # Regex to extract link
     HTTP = compile("http([^\)]+){}([^\)]+)".format(site))
     HTTPS = compile("https([^\)]+){}([^\)]+)".format(site))
     # Search
     for link in get_links(get_request(self.URL[search_engine].format(site, count), 3)):
         if search_engine not in link.lower():
             self.search_links += 1
             if HTTP.match(link) or HTTPS.match(link):
                 self.site_links += 1
                 if link not in self.links:
                     self.links.append(link)
Пример #5
0
 def run(self):
     link = "https://api.hackertarget.com/hostsearch/?q={}".format(
         self.target)
     try:
         resp = get_request(link, self.timeout)
         if resp.text and resp.status_code == 200:
             for line in resp.text.splitlines():
                 if line.count('.') > 1:
                     sub = self.sub_extractor(line)
                     if sub:
                         self.handler.sub_handler({
                             'Name': sub,
                             'Source': self.name
                         })
     except:
         pass
Пример #6
0
 def run(self):
     link = "http://web.archive.org/cdx/search/cdx?url=*.{}/*&output=json&collapse=urlkey".format(
         self.target)
     try:
         resp = get_request(link.format(self.target), self.timeout)
         if resp.text and resp.status_code == 200:
             for data in resp.json():
                 sub = urlparse(data[2]).netloc
                 if ":" in sub:  # Parse out Port
                     sub = sub.split(":")[0]
                 self.handler.sub_handler({
                     'Name': sub,
                     'Source': self.name
                 })
     except:
         pass