From c10bf6f2a5157b4ee73685ba7c6ab01edbceec5f Mon Sep 17 00:00:00 2001 From: Joost Agterhoek Date: Tue, 10 Jun 2025 21:05:34 +0200 Subject: [PATCH] got clean pages working, now need to clean up the actual HTML --- flask_soc_site/templates/history.html | 74 ++++++++++++++++++- flask_soc_site/templates/layout.html | 3 +- flask_soc_site/templates/lookup.html | 9 +-- flask_soc_site/templates/navbar.html | 3 +- .../templates/results-overview-new.html | 2 + flask_soc_site/templates/results.html | 4 +- flask_soc_site/templates/test.html | 4 + 7 files changed, 88 insertions(+), 11 deletions(-) diff --git a/flask_soc_site/templates/history.html b/flask_soc_site/templates/history.html index 0f9b091..8cf500b 100644 --- a/flask_soc_site/templates/history.html +++ b/flask_soc_site/templates/history.html @@ -1,7 +1,77 @@ {% extends "layout.html" %} -
+{% block content %} - +
+
+ +
+
+
+ + + + + + + + + + + +{% for host in session_history %} + + + + + + + + + + + + +{% endfor %} + +
IP addressVirusTotalAbuseIPDBDomainRegistration countryRegistration dateEmail security
{{host.host}}Score: {{host.vt['score']}} / {{host.vt['total']}}
+ Last updated: {{host.vt['last_update']}}
+
Score: {{host.abuseipdb['score']}} + Last reported: {{host.abuseipdb['last_reported']}}{{host.domain}}{{host.metadata['registrar_country']}}{{host.metadata['creation_date']}}SPF: {{host.email_security[0]}}, DMARC: {{host.email_security[1]}}
+

+ VirusTotal +
+ {% if host.vt['score'] > 0 %} + Vendor marked this host as malicious or suspicious: + {{host.vt['vendors']|join(', ')}} + {{host.vt['score']}} + {% else %} + No vendors marked this host as malicious or suspicious. + {% endif %} +
+ AbuseIPDB +
+ IP address is: {{host.abuseipdb['IP_address']}}
+ Is this Tor: {{host.abuseipdb['Tor']}}
+ Usage: {{host.abuseipdb['usage']}}
+
+ Domain registration +
+ {% if host.registrar|length %} + Registrar is: {{host.registar}}
+ {% else %} + No registrar name was found
+ {% endif %} +
+ Email security +
+ + +

+
+
+
+ +{% endblock %} diff --git a/flask_soc_site/templates/layout.html b/flask_soc_site/templates/layout.html index 0301fca..d7cc750 100644 --- a/flask_soc_site/templates/layout.html +++ b/flask_soc_site/templates/layout.html @@ -22,8 +22,9 @@ + {% include "navbar.html" %} + {# {% include "test.html" %} #} {% block content %} {% endblock %} - diff --git a/flask_soc_site/templates/lookup.html b/flask_soc_site/templates/lookup.html index 459d1a1..0a059f1 100644 --- a/flask_soc_site/templates/lookup.html +++ b/flask_soc_site/templates/lookup.html @@ -1,14 +1,13 @@ -{% extends "layout.html" %} +{% extends "layout.html" %} {% block content %} -{% include "test.html" %} +{% include "test.html" %} {% include "empty_form.html" %} -{% include "results.html" %} - -{% include "temp.html" %} +{# {% include "results.html" %} #} {% endblock %} + diff --git a/flask_soc_site/templates/navbar.html b/flask_soc_site/templates/navbar.html index 4c7aa4a..0bf100f 100644 --- a/flask_soc_site/templates/navbar.html +++ b/flask_soc_site/templates/navbar.html @@ -7,7 +7,7 @@ } --> - +{% block content %} +{% endblock %} diff --git a/flask_soc_site/templates/results-overview-new.html b/flask_soc_site/templates/results-overview-new.html index 4ced2c8..d3c4196 100644 --- a/flask_soc_site/templates/results-overview-new.html +++ b/flask_soc_site/templates/results-overview-new.html @@ -1,3 +1,5 @@ +{% include "test.html" %} +
{% if errors_present %} {% for error in errors %} diff --git a/flask_soc_site/templates/results.html b/flask_soc_site/templates/results.html index c48903e..fde8918 100644 --- a/flask_soc_site/templates/results.html +++ b/flask_soc_site/templates/results.html @@ -1,10 +1,10 @@ -{% extends "layout.html" %} + {% extends "layout.html" %} {% block content %} {# For multiple results, maybe make a top results overview and then a navigation menu to specific URL pages? See: https://realpython.com/primer-on-jinja-templating/#include-a-navigation-menu #} -{% include "test.html" %} + {# {% include "test.html" %} #} {% include "results-overview-new.html" %} diff --git a/flask_soc_site/templates/test.html b/flask_soc_site/templates/test.html index f03f8ca..b593862 100644 --- a/flask_soc_site/templates/test.html +++ b/flask_soc_site/templates/test.html @@ -1,3 +1,5 @@ +{% block content %} +
@@ -19,3 +21,5 @@
+ +{% endblock %}