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",
|
"subject": "Capture from Lookyloo to review",
|
||||||
"smtp_host": "localhost",
|
"smtp_host": "localhost",
|
||||||
"smtp_port": "25",
|
"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": {
|
"priority": {
|
||||||
"sources": {
|
"sources": {
|
||||||
|
|
|
@ -590,18 +590,24 @@ class Lookyloo():
|
||||||
if not get_config('generic', 'enable_mail_notification'):
|
if not get_config('generic', 'enable_mail_notification'):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
email_config = get_config('generic', 'email')
|
||||||
redirects = ''
|
redirects = ''
|
||||||
initial_url = ''
|
initial_url = ''
|
||||||
cache = self.capture_cache(capture_uuid)
|
cache = self.capture_cache(capture_uuid)
|
||||||
if cache:
|
if cache:
|
||||||
|
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:
|
||||||
|
initial_url = cache.url
|
||||||
if cache.redirects:
|
if cache.redirects:
|
||||||
redirects = "Redirects:\n"
|
redirects = "Redirects:\n"
|
||||||
|
if email_config['defang_urls']:
|
||||||
redirects += defang('\n'.join(cache.redirects), colon=True, all_dots=True)
|
redirects += defang('\n'.join(cache.redirects), colon=True, all_dots=True)
|
||||||
|
else:
|
||||||
|
redirects += '\n'.join(cache.redirects)
|
||||||
else:
|
else:
|
||||||
redirects = "No redirects."
|
redirects = "No redirects."
|
||||||
|
|
||||||
email_config = get_config('generic', 'email')
|
|
||||||
msg = EmailMessage()
|
msg = EmailMessage()
|
||||||
msg['From'] = email_config['from']
|
msg['From'] = email_config['from']
|
||||||
if email:
|
if email:
|
||||||
|
|
Loading…
Reference in New Issue