mirror of https://github.com/CIRCL/lookyloo
chg: Optionally not-defang the URLs in the email notification
parent
9337a96e5a
commit
01a4b4d632
|
@ -35,7 +35,8 @@
|
|||
"subject": "Capture from Lookyloo to review",
|
||||
"smtp_host": "localhost",
|
||||
"smtp_port": "25",
|
||||
"confirm_message": "Message the users need to confirm before they submit a notification."
|
||||
"confirm_message": "Message the users need to confirm before they submit a notification.",
|
||||
"defang_urls": true
|
||||
},
|
||||
"priority": {
|
||||
"sources": {
|
||||
|
|
|
@ -590,18 +590,24 @@ class Lookyloo():
|
|||
if not get_config('generic', 'enable_mail_notification'):
|
||||
return
|
||||
|
||||
email_config = get_config('generic', 'email')
|
||||
redirects = ''
|
||||
initial_url = ''
|
||||
cache = self.capture_cache(capture_uuid)
|
||||
if cache:
|
||||
initial_url = defang(cache.url, colon=True, all_dots=True)
|
||||
if email_config['defang_urls']:
|
||||
initial_url = defang(cache.url, colon=True, all_dots=True)
|
||||
else:
|
||||
initial_url = cache.url
|
||||
if cache.redirects:
|
||||
redirects = "Redirects:\n"
|
||||
redirects += defang('\n'.join(cache.redirects), colon=True, all_dots=True)
|
||||
if email_config['defang_urls']:
|
||||
redirects += defang('\n'.join(cache.redirects), colon=True, all_dots=True)
|
||||
else:
|
||||
redirects += '\n'.join(cache.redirects)
|
||||
else:
|
||||
redirects = "No redirects."
|
||||
|
||||
email_config = get_config('generic', 'email')
|
||||
msg = EmailMessage()
|
||||
msg['From'] = email_config['from']
|
||||
if email:
|
||||
|
|
Loading…
Reference in New Issue