Skip to content

Commit

Permalink
Fix copy-paste errors (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
frapava98 authored Oct 28, 2024
1 parent 0243fc4 commit d02fd98
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dnsrecon/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,14 @@ def brute_tlds(res, domain, verbose=False, thread_num=None):
"""

total_tlds = []
tlds_list = get_list('https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat', 'lists/all_tld.txt')
try:
tlds_list = requests.get(
'https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat', timeout=30
).text
except Exception as e:
tlds_list = ''
logger.error(f'Error {e} retrieving TLDs list')

for tld in tlds_list.split('\n'):
if '/' not in tld.strip() and tld.strip() != '':
total_tlds.append(tld.strip().lower().replace('*.', ''))
Expand All @@ -263,7 +270,7 @@ def brute_tlds(res, domain, verbose=False, thread_num=None):
future_results = {}

for tld in total_tlds:
full_domain = f'{domain_main}.{tld}'
full_domain = f'{domain}.{tld}'
future_results[executor.submit(res.get_ip, full_domain)] = full_domain

if verbose:
Expand Down

0 comments on commit d02fd98

Please sign in to comment.