Exemplo n.º 1
0
 def execute(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': 'DNSBufferOverRun'
                     })
                 except:
                     pass
             for line in data['RDNS']:
                 try:
                     sub = line.split(",")[1]
                     self.handler.sub_handler({
                         'Name': sub,
                         'Source': 'DNSBufferOverRun'
                     })
                 except:
                     pass
     except:
         pass
Exemplo n.º 2
0
 def execute(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': 'CRT.SH'})
     except:
         pass
Exemplo n.º 3
0
 def execute(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': 'DNS-Dumpster'})
     except:
         pass
Exemplo n.º 4
0
 def execute(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': 'ThreatCrowd'
                 })
     except:
         pass
Exemplo n.º 5
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)
Exemplo n.º 6
0
 def execute(self):
     link = "https://api.hackertarget.com/hostsearch/?q={}"
     try:
         resp = get_request(link.format(self.target), self.timeout)
         if resp.text:
             for line in resp.text.splitlines():
                 sub = self.sub_extractor(line)
                 if sub:
                     self.handler.sub_handler({
                         'Name': sub,
                         'Source': 'DNS-Dumpster'
                     })
     except:
         pass
Exemplo n.º 7
0
 def execute(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': 'Archive.org'
                 })
     except:
         pass