some visual changes

This commit is contained in:
2025-09-23 16:52:25 +02:00
parent bd13e890e1
commit c7f0fae19b
3 changed files with 19 additions and 30 deletions

View File

@@ -4,6 +4,7 @@ import threading
import subprocess
from http.server import BaseHTTPRequestHandler, HTTPServer
import mimetypes
from functools import lru_cache
from jsmin import jsmin # pip install jsmin
from log.Logger import *
@@ -37,7 +38,13 @@ import random
from hashes.hashes import hash_list
@lru_cache
def index_footer():
h1 = random.choice(hash_list)
# Ensure h2 is different from h1
h2_candidates = [h for h in hash_list if h != h1]
h2 = random.choice(h2_candidates) if h2_candidates else h1
return f"""
<footer style="
position: absolute;
@@ -46,9 +53,9 @@ def index_footer():
">
<hr style="border: 1px solid #ccc;" />
<p>
Hash 1 (<b>UTF-8</b>)<i>:{base64.b64encode(random.choice(hash_list).encode("utf-8")).decode("utf-8")}</i><br />
Hash 2 (<b>ASCII</b>)<i>:{base64.b64encode(random.choice(hash_list).encode("ascii")).decode("ascii")}</i><br />
<i>Decode Hashes to identify pages</i>
Server-Time (CET): <i>{time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())}</i><br />
Hash 1 (<b>UTF-8</b>)<i>:{base64.b64encode(h1.encode("utf-8")).decode("utf-8")}</i><br />
Hash 2 (<b>Windows-1252</b>)<i>:{base64.b64encode(h2.encode("windows-1252")).decode("windows-1252")}</i><br />
</p>
</footer>
"""