mirror of https://github.com/CIRCL/lookyloo
new: Optionally blur screenshots by default (public instances)
parent
5e6e784ee5
commit
b6c6c7756e
|
@ -13,6 +13,7 @@
|
|||
},
|
||||
"max_depth": 1,
|
||||
"use_user_agents_users": false,
|
||||
"enable_default_blur_screenshot": false,
|
||||
"enable_mail_notification": false,
|
||||
"email": {
|
||||
"from": "Lookyloo <lookyloo@myorg.local>",
|
||||
|
@ -33,6 +34,7 @@
|
|||
"time_delta_on_index": "Time interval of the capture displayed on the index",
|
||||
"max_depth": "Maximum depth for scraping. Anything > 1 will be exponentially bigger.",
|
||||
"use_user_agents_users": "Only usable for medium/high use instances: use the user agents of the users of the platform",
|
||||
"enable_default_blur_screenshot": "If true, blur the screenshot by default (useful on public instances)",
|
||||
"enable_mail_notification": "Enable email notification or not",
|
||||
"email": "Configuration for sending email notifications."
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ lookyloo: Lookyloo = Lookyloo()
|
|||
|
||||
user = lookyloo.get_config('cache_clean_user')
|
||||
time_delta_on_index = lookyloo.get_config('time_delta_on_index')
|
||||
blur_screenshot = lookyloo.get_config('enable_default_blur_screenshot')
|
||||
|
||||
logging.basicConfig(level=lookyloo.get_config('loglevel'))
|
||||
|
||||
|
@ -419,6 +420,7 @@ def tree(tree_uuid: str, urlnode_uuid: Optional[str]=None):
|
|||
return render_template('tree.html', tree_json=tree_json, start_time=start_time,
|
||||
user_agent=user_agent, root_url=root_url, tree_uuid=tree_uuid,
|
||||
meta=meta, enable_mail_notification=enable_mail_notification,
|
||||
blur_screenshot=blur_screenshot,
|
||||
urlnode_uuid=urlnode_uuid, has_redirects=True if cache['redirects'] else False)
|
||||
|
||||
except NoValidHarFile as e:
|
||||
|
|
|
@ -56,14 +56,8 @@
|
|||
background: #fff;
|
||||
}
|
||||
|
||||
#screenshot {
|
||||
position: fixed;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
background: white;
|
||||
border: 2px solid;
|
||||
height: 1030px;
|
||||
overflow: hidden;
|
||||
.blur {
|
||||
filter: blur(10px);
|
||||
}
|
||||
|
||||
#legend_container {
|
||||
|
|
|
@ -240,7 +240,15 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<img src="{{ url_for('image', tree_uuid=tree_uuid) }}" class="img-fluid"/>
|
||||
<center>
|
||||
{% if blur_screenshot %}
|
||||
<button type="button" class="btn btn-primary" onclick="$('#screenshot').removeClass('blur')"> Unblur screenshot</button>
|
||||
</br>
|
||||
</hr>
|
||||
</br>
|
||||
{% endif %}
|
||||
<img src="{{ url_for('image', tree_uuid=tree_uuid) }}" class="img-fluid {{ 'blur' if blur_screenshot else '' }}" id="screenshot"/>
|
||||
</center>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
|
|
Loading…
Reference in New Issue