예제 #1
0
 def save(self):
     logger.log('DEBUG', 'Saving results')
     if self.format == 'txt':
         data = str(self.results)
     else:
         data = self.results.export(self.format)
     utils.save_data(self.path, data)
예제 #2
0
파일: brute.py 프로젝트: yougar0/linbing
def get_nameservers_path(enable_wildcard, ns_ip_list):
    path = settings.brute_nameservers_path
    if not enable_wildcard:
        return path
    if not ns_ip_list:
        return path
    path = settings.authoritative_dns_path
    ns_data = '\n'.join(ns_ip_list)
    utils.save_data(path, ns_data)
    return path
예제 #3
0
def export_data(format, path, rows, show, table_name, target):
    format = utils.check_format(format, len(rows))
    path = utils.check_path(path, target, format)
    if show:
        print(rows.dataset)
    data = rows.export(format)
    utils.save_data(path, data)
    logger.log('ALERT', f'The subdomain result for {table_name}: {path}')
    data = rows.as_dict()
    return data, format, path
예제 #4
0
파일: brute.py 프로젝트: yougar0/linbing
def save_brute_dict(dict_path, dict_set):
    dict_data = '\n'.join(dict_set)
    if not utils.save_data(dict_path, dict_data):
        logger.log('FATAL', 'Saving dictionary error')
        exit(1)
예제 #5
0
def save_subdomains(save_path, subdomain_list):
    logger.log('DEBUG', f'Saving resolved subdomain')
    subdomain_data = '\n'.join(subdomain_list)
    if not utils.save_data(save_path, subdomain_data):
        logger.log('FATAL', 'Save resolved subdomain error')
        exit(1)