From 95a660cbda6dc7be8950a059947fd54724bd0d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 19 Feb 2024 22:30:43 +0100 Subject: [PATCH] Add landing page to favicon page --- lookyloo/lookyloo.py | 4 ++-- website/web/templates/favicon_details.html | 6 +++++- website/web/templates/favicons.html | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index 1971249b..e9a29ec4 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -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 diff --git a/website/web/templates/favicon_details.html b/website/web/templates/favicon_details.html index 3965b7c8..9c5ed277 100644 --- a/website/web/templates/favicon_details.html +++ b/website/web/templates/favicon_details.html @@ -16,16 +16,20 @@ Capture Title + Landing page - {% for capture_uuid, title in captures %} + {% for capture_uuid, title, landing_page in captures %} {{ title }} + + {{landing_page}} + {% endfor %} diff --git a/website/web/templates/favicons.html b/website/web/templates/favicons.html index 3353d29f..49962d07 100644 --- a/website/web/templates/favicons.html +++ b/website/web/templates/favicons.html @@ -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() }}