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_talisman import Talisman # type: ignore[import-untyped]
from lacuscore import CaptureStatus, CaptureSettingsError
from markupsafe import Markup
from puremagic import from_string
from pymisp import MISPEvent, MISPServerError # type: ignore[attr-defined]
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:
if code in http.client.responses:
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)
@ -241,7 +242,7 @@ def get_sri(directory: str, filename: str) -> str:
if ignore_sri:
return ""
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)

View File

@ -32,7 +32,7 @@
<a href="https://www.lookyloo.eu/docs/main/index.html">Documentation</a>
</div>
<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>
{% if show_project_page %}
<div class="corner-ribbon top-right sticky white shadow">
@ -49,7 +49,7 @@
{{ render_messages(container=True, dismissible=True) }}
{% if current_user.is_authenticated %}
<p class="lead">You are logged-in as <strong>{{ current_user.id }}</strong>
</br>
<br>
{% if user_config %}
{% if user_config['overwrite'] == true %}
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.
{%else%}
<b>Total Hits</b>: {{ merged|length }}</br>
<b>Total ressources</b>: {{total_ressources}}</br></br>
<b>Total Hits</b>: {{ merged|length }}<br>
<b>Total ressources</b>: {{total_ressources}}<br><br>
{% for sha1, entries in merged.items() %}
<dl class="row">
<dt class="col-sm-2">URLs in tree</dt>
<dd class="col-sm-10">
{% for node in entries['nodes'] %}
{{ node }} </br>
{{ node }} <br>
{% endfor %}
</dd>
</dl>
@ -24,7 +24,7 @@
{% else %}
{{ v }}
{% endif %}
</br>
<br>
{% endfor %}
</dd>
</dl>

View File

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

View File

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

View File

@ -170,7 +170,7 @@
{% if details[0] %}
- This file is known <b>legitimate</b> on the following domains: {{ ', '.join(details[1]) }}.
{% elif details[0] == False %}
</br>
<br>
<p>
The response sould be considered as
{% if details[1] is mapping and details[1].get('tag') %}
@ -204,7 +204,7 @@
<li>
{{ 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) }} -
</br>
<br>
{{ button_text }}
<button type="button" class="btn btn-primary locateInTree" data-hostnode="{{ detail[1] }}">Locate</button>
</li>
@ -262,7 +262,7 @@
width="21" height="21"
{% if urlnode.generic_type == "image" %}
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 %}
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-html="true"
title="{{icon_info['tooltip']}} <br/>Click to download."
@ -293,7 +293,7 @@
{% macro shorten_string(string, cut_length, with_title=False) %}
{% if with_title %}
<div title={{string}}>
<div title="{{string}}">
{%endif%}
{% 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>Skips the entries in warnings lists enabled on your MISP instance.</h6>
{% if misps_occurrences|length > 1 %}
</br>
<br>
<hr/>
<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">
{%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>

View File

@ -1,7 +1,7 @@
{% if misp_instances_settings|length > 1 %}
<center>
<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">
{%for name in misp_instances_settings %}
<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 %}
<tr>
<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')) }}
</td>
<td>{{ freq }}</td>
<td> {{ context['type'] }} - {{ context['details'] }}</br>
<td> {{ context['type'] }} - {{ context['details'] }}<br>
{{ context_form(capture_uuid, urlnode_uuid, h, 'ressources') }}
</td>
<td>{{ mimetype }}</td>

View File

@ -27,7 +27,7 @@
alt="Lookyloo" width="400">
</a>
</center>
</br>
<br>
<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>
<div class="row mb-3">

View File

@ -33,7 +33,7 @@
<!-- Submission type -->
<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="row input-group mb-3">
<label for="singleCaptureField" class="col-sm-1 col-form-label">URL(s):</label>
@ -56,7 +56,7 @@
<hr>
<center>
</br>
<br>
<button type="submit" class="new-capture-button btn btn-primary" id="btn-looking">Submit!</button>
</center>
</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.
{% endif %}
</b>
</br>
</br>
<br>
<br>
<button type="submit" class="new-capture-button btn btn-primary" id="btn-looking">Render capture!</button>
</center>
</form>

View File

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

View File

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