Skip to content

Commit

Permalink
Fixed wrong WHOIS gathering function behaviour (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
OSINT-TECHNOLOGIES committed Sep 9, 2024
1 parent c8bd9ab commit 7e1bfc1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions datagather_modules/crawl_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@ def whois_gather(short_domain):
try:
logging.info('WHOIS INFO GATHERING: OK')
w = whois.whois(short_domain)
print(w)
if w.org is None:
w['org'] = 'n/a'
logging.info('WHOIS INFO GATHERING: OK')
return w
except Exception as e:
print(Fore.RED + "Error while gathering WHOIS information. See journal for details")
logging.error(f'WHOIS GATHERING: ERROR. REASON: {e}')
w = {
'registrar': 'N/A',
'creation_date': 'N/A',
'expiration_date': 'N/A',
'name_servers': ['N/A'],
'org': 'N/A'
}
return w
pass

def contact_mail_gather(url):
Expand Down

0 comments on commit 7e1bfc1

Please sign in to comment.