Add landing page to favicon page

pull/887/head
Raphaël Vinot 2024-02-19 22:30:43 +01:00
parent 8b2f875436
commit 95a660cbda
3 changed files with 8 additions and 4 deletions

View File

@ -1046,10 +1046,10 @@ class Lookyloo():
for domain, freq in self.indexing.get_cookie_domains(cookie_name)]
return captures, domains
def get_favicon_investigator(self, favicon_sha512: str, /) -> tuple[list[tuple[str, str]], bytes | None]:
def get_favicon_investigator(self, favicon_sha512: str, /) -> tuple[list[tuple[str, str, str]], bytes | None]:
'''Returns all the captures related to a cookie name entry, used in the web interface.'''
cached_captures = self.sorted_capture_cache([uuid for uuid in self.indexing.get_captures_favicon(favicon_sha512)])
captures = [(cache.uuid, cache.title) for cache in cached_captures]
captures = [(cache.uuid, cache.title, cache.redirects[-1]) for cache in cached_captures]
favicon = self.indexing.get_favicon(favicon_sha512)
return captures, favicon

View File

@ -16,16 +16,20 @@
<thead>
<tr>
<th>Capture Title</th>
<th>Landing page</th>
</tr>
</thead>
<tbody>
{% for capture_uuid, title in captures %}
{% for capture_uuid, title, landing_page in captures %}
<tr>
<td>
<a href="{{ url_for('tree', tree_uuid=capture_uuid) }}">
{{ title }}
</a>
</td>
<td>
{{landing_page}}
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -2,7 +2,7 @@
{% from 'bootstrap5/utils.html' import render_messages %}
{% block title %}HTTP Headers Hashes lookup{% endblock %}
{% block title %}Favicons lookup{% endblock %}
{% block scripts %}
{{ super() }}