fix: replace </br> -> <br>

pull/1009/head
Raphaël Vinot 2024-12-06 01:38:53 +01:00
parent bfb6b0bd3d
commit e7075c7791
No known key found for this signature in database
GPG Key ID: 32E4E1C133B3792F
14 changed files with 52 additions and 51 deletions

View File

@ -34,6 +34,7 @@ from flask_cors import CORS # type: ignore[import-untyped]
from flask_restx import Api # type: ignore[import-untyped] from flask_restx import Api # type: ignore[import-untyped]
from flask_talisman import Talisman # type: ignore[import-untyped] from flask_talisman import Talisman # type: ignore[import-untyped]
from lacuscore import CaptureStatus, CaptureSettingsError from lacuscore import CaptureStatus, CaptureSettingsError
from markupsafe import Markup
from puremagic import from_string from puremagic import from_string
from pymisp import MISPEvent, MISPServerError # type: ignore[attr-defined] from pymisp import MISPEvent, MISPServerError # type: ignore[attr-defined]
from werkzeug.security import check_password_hash from werkzeug.security import check_password_hash
@ -224,7 +225,7 @@ app.jinja_env.globals.update(sizeof_fmt=sizeof_fmt)
def http_status_description(code: int) -> str: def http_status_description(code: int) -> str:
if code in http.client.responses: if code in http.client.responses:
return http.client.responses[code] return http.client.responses[code]
return f'Invalid code: {code}' return Markup(f'Invalid code: "{code}"')
app.jinja_env.globals.update(http_status_description=http_status_description) app.jinja_env.globals.update(http_status_description=http_status_description)
@ -241,7 +242,7 @@ def get_sri(directory: str, filename: str) -> str:
if ignore_sri: if ignore_sri:
return "" return ""
sha512 = sri_load()[directory][filename] sha512 = sri_load()[directory][filename]
return f'integrity="sha512-{sha512}"' return Markup(f'integrity="sha512-{sha512}"')
app.jinja_env.globals.update(get_sri=get_sri) app.jinja_env.globals.update(get_sri=get_sri)

View File

@ -32,7 +32,7 @@
<a href="https://www.lookyloo.eu/docs/main/index.html">Documentation</a> <a href="https://www.lookyloo.eu/docs/main/index.html">Documentation</a>
</div> </div>
<div class="corner-ribbon bottom-left sticky white shadow"> <div class="corner-ribbon bottom-left sticky white shadow">
<a href="https://github.com/Lookyloo/lookyloo/releases/tag/v{{version}}">Changelog</br>(v{{version}})</a> <a href="https://github.com/Lookyloo/lookyloo/releases/tag/v{{version}}">Changelog<br>(v{{version}})</a>
</div> </div>
{% if show_project_page %} {% if show_project_page %}
<div class="corner-ribbon top-right sticky white shadow"> <div class="corner-ribbon top-right sticky white shadow">
@ -49,7 +49,7 @@
{{ render_messages(container=True, dismissible=True) }} {{ render_messages(container=True, dismissible=True) }}
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<p class="lead">You are logged-in as <strong>{{ current_user.id }}</strong> <p class="lead">You are logged-in as <strong>{{ current_user.id }}</strong>
</br> <br>
{% if user_config %} {% if user_config %}
{% if user_config['overwrite'] == true %} {% if user_config['overwrite'] == true %}
The settings in your users configuration file will overwrite the settings you configure in the form below. The settings in your users configuration file will overwrite the settings you configure in the form below.

View File

@ -3,14 +3,14 @@
No result data available or hashlookup module not enabled. No result data available or hashlookup module not enabled.
{%else%} {%else%}
<b>Total Hits</b>: {{ merged|length }}</br> <b>Total Hits</b>: {{ merged|length }}<br>
<b>Total ressources</b>: {{total_ressources}}</br></br> <b>Total ressources</b>: {{total_ressources}}<br><br>
{% for sha1, entries in merged.items() %} {% for sha1, entries in merged.items() %}
<dl class="row"> <dl class="row">
<dt class="col-sm-2">URLs in tree</dt> <dt class="col-sm-2">URLs in tree</dt>
<dd class="col-sm-10"> <dd class="col-sm-10">
{% for node in entries['nodes'] %} {% for node in entries['nodes'] %}
{{ node }} </br> {{ node }} <br>
{% endfor %} {% endfor %}
</dd> </dd>
</dl> </dl>
@ -24,7 +24,7 @@
{% else %} {% else %}
{{ v }} {{ v }}
{% endif %} {% endif %}
</br> <br>
{% endfor %} {% endfor %}
</dd> </dd>
</dl> </dl>

View File

@ -25,12 +25,12 @@
<center> <center>
{% if hostnode.idna %} {% if hostnode.idna %}
<h3>{{hostnode.idna}} <h3>{{hostnode.idna}}
</br><small class="text-body-secondary">{{hostnode.name}}</small> <br><small class="text-body-secondary">{{hostnode.name}}</small>
</h3> </h3>
{% else %} {% else %}
<h3>{{hostnode.name}}</h3> <h3>{{hostnode.name}}</h3>
{% endif %} {% endif %}
</br> <br>
<button type="button" class="btn btn-primary locateInTree" data-hostnode="{{ hostnode_uuid }}">Locate in tree</button> <button type="button" class="btn btn-primary locateInTree" data-hostnode="{{ hostnode_uuid }}">Locate in tree</button>
{% if uwhois_available %} {% if uwhois_available %}
<a href="{{ url_for('whois', query=hostnode.name) }}" class="btn btn-primary" role="button"> <a href="{{ url_for('whois', query=hostnode.name) }}" class="btn btn-primary" role="button">
@ -44,7 +44,7 @@
Download all Hashes as text Download all Hashes as text
</a> </a>
</center> </center>
</br> <br>
<div class="accordion" id="accordionDNS"> <div class="accordion" id="accordionDNS">
<div class="accordion-item"> <div class="accordion-item">
<h2 class="accordion-header"> <h2 class="accordion-header">
@ -174,7 +174,7 @@
{% if url['url_object'].posted_data %} {% if url['url_object'].posted_data %}
<a href="{{ url_for('urlnode_post_request', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}"> <a href="{{ url_for('urlnode_post_request', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}">
Download posted data Download posted data
</a></br> </a><br>
{% if url['url_object'].posted_data is string %} {% if url['url_object'].posted_data is string %}
Posted data size: {{ sizeof_fmt(url['url_object'].posted_data|length) }} Posted data size: {{ sizeof_fmt(url['url_object'].posted_data|length) }}
{% endif %} {% endif %}
@ -228,7 +228,7 @@
<a href="{{ url_for('urlnode_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}"> <a href="{{ url_for('urlnode_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}">
Download rendered HTML page Download rendered HTML page
</a>({{ sizeof_fmt(url['url_object'].rendered_html.getbuffer().nbytes)}}) </a>({{ sizeof_fmt(url['url_object'].rendered_html.getbuffer().nbytes)}})
</br> <br>
<a href="{{ url_for('urlnode_urls_in_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}"> <a href="{{ url_for('urlnode_urls_in_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}">
Download URLs in rendered HTML page Download URLs in rendered HTML page
</a> </a>
@ -273,7 +273,7 @@
{% endif %} {% endif %}
{% if enable_context_by_users %} {% if enable_context_by_users %}
</br> <br>
{{ context_form(tree_uuid, url['url_object'].uuid, {{ context_form(tree_uuid, url['url_object'].uuid,
url['url_object'].body_hash, 'hostnode_popup') }} url['url_object'].body_hash, 'hostnode_popup') }}
{% endif %} {% endif %}
@ -304,7 +304,7 @@
{{ get_ressource_button(tree_uuid, url['url_object'].uuid, hash, {{ get_ressource_button(tree_uuid, url['url_object'].uuid, hash,
'Download the embedded ressource', 'Download the embedded ressource',
details['type'] and details['type'].startswith('image')) }} details['type'] and details['type'].startswith('image')) }}
</br> <br>
{% if enable_context_by_users %} {% if enable_context_by_users %}
{{ context_form(tree_uuid, url['url_object'].uuid, hash, 'hostnode_popup') }} {{ context_form(tree_uuid, url['url_object'].uuid, hash, 'hostnode_popup') }}
{% endif %} {% endif %}

View File

@ -70,7 +70,7 @@ $(document).ready(function () {
</center> </center>
<center> <center>
<h4>Web forensics tool</h4> <h4>Web forensics tool</h4>
</br> <br>
<a href="{{ url_for('capture_web') }}"> <a href="{{ url_for('capture_web') }}">
<button class="new-capture-button btn btn-primary">Start a new capture</button> <button class="new-capture-button btn btn-primary">Start a new capture</button>
</a> </a>

View File

@ -170,7 +170,7 @@
{% if details[0] %} {% if details[0] %}
- This file is known <b>legitimate</b> on the following domains: {{ ', '.join(details[1]) }}. - This file is known <b>legitimate</b> on the following domains: {{ ', '.join(details[1]) }}.
{% elif details[0] == False %} {% elif details[0] == False %}
</br> <br>
<p> <p>
The response sould be considered as The response sould be considered as
{% if details[1] is mapping and details[1].get('tag') %} {% if details[1] is mapping and details[1].get('tag') %}
@ -204,7 +204,7 @@
<li> <li>
{{ detail[0] }}: <a href="{{ url_for('cookies_name_detail', cookie_name=cookie_name_value[0], from_popup=True) }}"> {{ detail[0] }}: <a href="{{ url_for('cookies_name_detail', cookie_name=cookie_name_value[0], from_popup=True) }}">
{{ cookie_name_value[0] }}</a>={{ shorten_string(cookie_name_value[1], 200) }} - {{ cookie_name_value[0] }}</a>={{ shorten_string(cookie_name_value[1], 200) }} -
</br> <br>
{{ button_text }} {{ button_text }}
<button type="button" class="btn btn-primary locateInTree" data-hostnode="{{ detail[1] }}">Locate</button> <button type="button" class="btn btn-primary locateInTree" data-hostnode="{{ detail[1] }}">Locate</button>
</li> </li>
@ -262,7 +262,7 @@
width="21" height="21" width="21" height="21"
{% if urlnode.generic_type == "image" %} {% if urlnode.generic_type == "image" %}
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true"
title='<img class="ressource_preview" src="{{ url_for('get_ressource_preview', tree_uuid=tree_uuid, node_uuid=urlnode.uuid) }}"/> </br>Click to download.' title='<img class="ressource_preview" src="{{ url_for('get_ressource_preview', tree_uuid=tree_uuid, node_uuid=urlnode.uuid) }}"/> <br>Click to download.'
{% else %} {% else %}
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true"
title="{{icon_info['tooltip']}} <br/>Click to download." title="{{icon_info['tooltip']}} <br/>Click to download."
@ -293,7 +293,7 @@
{% macro shorten_string(string, cut_length, with_title=False) %} {% macro shorten_string(string, cut_length, with_title=False) %}
{% if with_title %} {% if with_title %}
<div title={{string}}> <div title="{{string}}">
{%endif%} {%endif%}
{% if string|length > cut_length %} {% if string|length > cut_length %}

View File

@ -3,10 +3,10 @@
<h6>Searching on URL, domain, IPs, and CNAMEs for all the nodes up to the rendered page.</h6> <h6>Searching on URL, domain, IPs, and CNAMEs for all the nodes up to the rendered page.</h6>
<h6>Skips the entries in warnings lists enabled on your MISP instance.</h6> <h6>Skips the entries in warnings lists enabled on your MISP instance.</h6>
{% if misps_occurrences|length > 1 %} {% if misps_occurrences|length > 1 %}
</br> <br>
<hr/> <hr/>
<label for="mispSelector">Select the MISP instance to search in</label> <label for="mispSelector">Select the MISP instance to search in</label>
</br> <br>
<div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector"> <div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector">
{%for name in misps_occurrences %} {%for name in misps_occurrences %}
<button type="button" value="lookup_{{name.replace(' ', '_')}}" class="btn btn-outline-primary {%if name == current_misp%}active{%endif%}" href="#">{{name}}</a></li> <button type="button" value="lookup_{{name.replace(' ', '_')}}" class="btn btn-outline-primary {%if name == current_misp%}active{%endif%}" href="#">{{name}}</a></li>

View File

@ -1,7 +1,7 @@
{% if misp_instances_settings|length > 1 %} {% if misp_instances_settings|length > 1 %}
<center> <center>
<label for="mispSelector">Select the MISP instance to push to</label> <label for="mispSelector">Select the MISP instance to push to</label>
</br> <br>
<div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector"> <div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector">
{%for name in misp_instances_settings %} {%for name in misp_instances_settings %}
<button type="button" value="push_{{name.replace(' ', '_')}}" <button type="button" value="push_{{name.replace(' ', '_')}}"

View File

@ -41,11 +41,11 @@
{% for h, freq, context, capture_uuid, urlnode_uuid, filename, mimetype in ressources %} {% for h, freq, context, capture_uuid, urlnode_uuid, filename, mimetype in ressources %}
<tr> <tr>
<td> <td>
<a href="{{ url_for('body_hash_details', body_hash=h) }}">{{ shorten_string(h, 10) }}</a></br> <a href="{{ url_for('body_hash_details', body_hash=h) }}">{{ shorten_string(h, 10) }}</a><br>
{{ get_ressource_button(capture_uuid, urlnode_uuid, h, 'Download sample', mimetype and mimetype.startswith('image')) }} {{ get_ressource_button(capture_uuid, urlnode_uuid, h, 'Download sample', mimetype and mimetype.startswith('image')) }}
</td> </td>
<td>{{ freq }}</td> <td>{{ freq }}</td>
<td> {{ context['type'] }} - {{ context['details'] }}</br> <td> {{ context['type'] }} - {{ context['details'] }}<br>
{{ context_form(capture_uuid, urlnode_uuid, h, 'ressources') }} {{ context_form(capture_uuid, urlnode_uuid, h, 'ressources') }}
</td> </td>
<td>{{ mimetype }}</td> <td>{{ mimetype }}</td>

View File

@ -27,7 +27,7 @@
alt="Lookyloo" width="400"> alt="Lookyloo" width="400">
</a> </a>
</center> </center>
</br> <br>
<div>Please only search one of the following thing at a time.</div> <div>Please only search one of the following thing at a time.</div>
<form role="form" action="{{ url_for('search') }}" method=post enctype=multipart/form-data> <form role="form" action="{{ url_for('search') }}" method=post enctype=multipart/form-data>
<div class="row mb-3"> <div class="row mb-3">

View File

@ -33,7 +33,7 @@
<!-- Submission type --> <!-- Submission type -->
<div class="tab-content" id="nav-tabContent"> <div class="tab-content" id="nav-tabContent">
</br> <br>
<div class="tab-pane fade show active" id="nav-url" role="tabpanel" aria-labelledby="nav-url-tab"> <div class="tab-pane fade show active" id="nav-url" role="tabpanel" aria-labelledby="nav-url-tab">
<div class="row input-group mb-3"> <div class="row input-group mb-3">
<label for="singleCaptureField" class="col-sm-1 col-form-label">URL(s):</label> <label for="singleCaptureField" class="col-sm-1 col-form-label">URL(s):</label>
@ -56,7 +56,7 @@
<hr> <hr>
<center> <center>
</br> <br>
<button type="submit" class="new-capture-button btn btn-primary" id="btn-looking">Submit!</button> <button type="submit" class="new-capture-button btn btn-primary" id="btn-looking">Submit!</button>
</center> </center>
</form> </form>

View File

@ -91,8 +91,8 @@
By default, the capture is private (not visible on the index page). If you want it to be public tick the box at the top of the form. By default, the capture is private (not visible on the index page). If you want it to be public tick the box at the top of the form.
{% endif %} {% endif %}
</b> </b>
</br> <br>
</br> <br>
<button type="submit" class="new-capture-button btn btn-primary" id="btn-looking">Render capture!</button> <button type="submit" class="new-capture-button btn btn-primary" id="btn-looking">Render capture!</button>
</center> </center>
</form> </form>

View File

@ -164,7 +164,7 @@
{% endif %} {% endif %}
{% if enable_mail_notification %} {% if enable_mail_notification %}
<li class="list-group-item"> <li class="list-group-item">
<a href="#emailModal" data-bs-toggle="modal" data-bs-target="#emailModal" role="button" class="btn btn-outline-danger">Report suspicious</br>capture</a> <a href="#emailModal" data-bs-toggle="modal" data-bs-target="#emailModal" role="button" class="btn btn-outline-danger">Report suspicious<br>capture</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
@ -767,16 +767,16 @@
{% set screenshot_too_big = screenshot_size > 10 * 1024 * 1024 %} {% set screenshot_too_big = screenshot_size > 10 * 1024 * 1024 %}
{% if screenshot_too_big %} {% if screenshot_too_big %}
Image too big ({{ sizeof_fmt(screenshot_size) }}) to display in the browser, the screenshot below is cropped. Image too big ({{ sizeof_fmt(screenshot_size) }}) to display in the browser, the screenshot below is cropped.
</br> <br>
{% endif %} {% endif %}
{% if blur_screenshot %} {% if blur_screenshot %}
<button type="button" class="btn btn-primary" id="blurScreenshot">Unblur</button> <button type="button" class="btn btn-primary" id="blurScreenshot">Unblur</button>
{% endif %} {% endif %}
<a href="{{ url_for('image', tree_uuid=tree_uuid) }}" role="button" class="btn btn-primary">Download</a> <a href="{{ url_for('image', tree_uuid=tree_uuid) }}" role="button" class="btn btn-primary">Download</a>
</br> <br>
</br> <br>
<img src="{{ url_for('image', tree_uuid=tree_uuid, width=1024 if screenshot_too_big else '') }}" class="img-fluid {{ 'blur' if blur_screenshot else '' }}" id="screenshot"/> <img src="{{ url_for('image', tree_uuid=tree_uuid, width=1024 if screenshot_too_big else '') }}" class="img-fluid {{ 'blur' if blur_screenshot else '' }}" id="screenshot"/>
</br> <br>
</center> </center>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@ -793,10 +793,10 @@
<h4 class="modal-title" id="modulesModalLabel"> <h4 class="modal-title" id="modulesModalLabel">
Reports from 3rd party services Reports from 3rd party services
</h4> </h4>
</br> <br>
<button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
</br> <br>
<center><h5>Note that if you get an error when you click on a <center><h5>Note that if you get an error when you click on a
link below, it probably means the capture is still ongoing. link below, it probably means the capture is still ongoing.
Try reloading the page after a few seconds.</h5></center> Try reloading the page after a few seconds.</h5></center>
@ -818,10 +818,10 @@
<h4 class="modal-title" id="historyModalLabel"> <h4 class="modal-title" id="historyModalLabel">
Historical data and context about this capture Historical data and context about this capture
</h4> </h4>
</br> <br>
<button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
</br> <br>
<div class="modal-body"> <div class="modal-body">
... loading results historical context ... ... loading results historical context ...
</div> </div>
@ -839,10 +839,10 @@
<h4 class="modal-title" id="downloadModalLabel"> <h4 class="modal-title" id="downloadModalLabel">
Download specific elements of the capture. Download specific elements of the capture.
</h4> </h4>
</br> <br>
<button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
</br> <br>
<div class="modal-body"> <div class="modal-body">
<ul> <ul>
<li> <li>
@ -887,10 +887,10 @@
<h4 class="modal-title" id="hashlookupModalLabel"> <h4 class="modal-title" id="hashlookupModalLabel">
Hits in Hashlookup Hits in Hashlookup
</h4> </h4>
</br> <br>
<button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
</br> <br>
<div class="modal-body"> <div class="modal-body">
... loading results from hashlookup ... ... loading results from hashlookup ...
</div> </div>
@ -1006,7 +1006,7 @@
<div class="alert alert-warning" role="alert"> <div class="alert alert-warning" role="alert">
The monitoring instance is configured to automatically expire what you want to The monitoring instance is configured to automatically expire what you want to
monitor after <b>{{monitoring_settings["max_captures"]}} captures</b>. monitor after <b>{{monitoring_settings["max_captures"]}} captures</b>.
</br> <br>
Keep that in mind when you select the frequency. Keep that in mind when you select the frequency.
</div> </div>
{% endif %} {% endif %}

View File

@ -5,15 +5,15 @@
{% block content %} {% block content %}
{{ render_messages(container=True, dismissible=True) }} {{ render_messages(container=True, dismissible=True) }}
<div class="container"> <div class="container">
</br> <br>
</br> <br>
</br> <br>
</br> <br>
</br> <br>
</br> <br>
<center> <center>
<b>{{ message }} <b>{{ message }}
</br> <br>
Please wait... Please wait...
</b> </b>