mirror of https://github.com/CIRCL/lookyloo
fix: Avoid issue if a cature is somewhat broken and we want to send a notification
parent
2c5c30006c
commit
79c9b95faf
|
@ -730,7 +730,7 @@ class Lookyloo():
|
||||||
redirects = ''
|
redirects = ''
|
||||||
initial_url = ''
|
initial_url = ''
|
||||||
cache = self.capture_cache(capture_uuid)
|
cache = self.capture_cache(capture_uuid)
|
||||||
if cache:
|
if cache and hasattr(cache, 'url'):
|
||||||
if email_config['defang_urls']:
|
if email_config['defang_urls']:
|
||||||
initial_url = defang(cache.url, colon=True, all_dots=True)
|
initial_url = defang(cache.url, colon=True, all_dots=True)
|
||||||
else:
|
else:
|
||||||
|
@ -743,6 +743,10 @@ class Lookyloo():
|
||||||
redirects += '\n'.join(cache.redirects)
|
redirects += '\n'.join(cache.redirects)
|
||||||
else:
|
else:
|
||||||
redirects = "No redirects."
|
redirects = "No redirects."
|
||||||
|
else:
|
||||||
|
initial_url = 'Unable to get URL from cache, this is probably a bug.'
|
||||||
|
if hasattr(cache, 'error'):
|
||||||
|
initial_url += f' - {cache.error}'
|
||||||
|
|
||||||
msg = EmailMessage()
|
msg = EmailMessage()
|
||||||
msg['From'] = email_config['from']
|
msg['From'] = email_config['from']
|
||||||
|
|
Loading…
Reference in New Issue