コード例 #1
0
def takeover_check(sub, target):
    for cname in dns_lookup(sub, 'CNAME'):
        if target not in cname:
            http = respcode(sub, proto='http')
            https = respcode(sub, proto='https')
            stdout.write("{:<45}\t({:<3}/{:<3})\t{}\n".format(
                sub, http, https, cname))
コード例 #2
0
 def execute(self):
     for s in self.sublist:
         try:
             sub = s + '.' + self.target
             dns_query = dns_lookup(sub, 'A')
             if dns_query:
                 self.handler.sub_handler({'Name': sub, 'Source': 'DNS-Brute', 'DNS': dns_query})
         except Exception as e:
             sys.stdout.write("\033[1;30m{:<13}\t{:<25}\033[1;m\n".format('[Error-03]', str(e)))
コード例 #3
0
    def data_handler(self, sub):
        try:
            dns = sub['DNS']
        except:
            dns = dns_lookup(sub['Name'], 'A')

        sub['HTTP']  = respcode(sub['Name'], proto='http')
        sub['HTTPS'] = respcode(sub['Name'], proto='https')
        sub['DNS']   = dns
        self.subq.append(sub)
コード例 #4
0
ファイル: sub_handler.py プロジェクト: securestep9/subscraper
 def data_handler(self, sub):
     if re.match(self.sub_regex, sub['Name']):
         if "*." in sub['Name']:
             sub['Name'] = sub['Name'].split('*.')[1]
         if self.sub_enum >= 2 and 'DNS' not in sub:
             sub['DNS'] = dns_lookup(sub['Name'], 'A')
         if self.sub_enum >= 3:
             sub['HTTP'] = respcode(sub['Name'], proto='http')
             sub['HTTPS'] = respcode(sub['Name'], proto='https')
         self.reporter.subq.put(sub)
コード例 #5
0
ファイル: dns_brute.py プロジェクト: th3cyb3rc0p/subscraper
 def resolver(self, sub):
     try:
         dns_query = dns_lookup(sub, 'A')
         if dns_query:
             self.handler.sub_handler({
                 'Name': sub,
                 'Source': 'DNS-Brute',
                 'DNS': dns_query
             })
     except:
         pass
コード例 #6
0
def takeover_check(target):
    for cname in dns_lookup(target, 'CNAME'):
        http = respcode(target, proto='http')
        https = respcode(target, proto='https')
        stdout.write("{:<45}\t({:<3}/{:<3})\t{}\n".format(
            target, http, https, cname))