From 9d16df60539c5e1fc42958da3abb1dbba88c96dd Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sat, 14 Feb 2026 01:20:49 -0500 Subject: [PATCH] Updated home with table of contents --- badtests.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/badtests.py b/badtests.py index dde8c3f..f4f6b73 100644 --- a/badtests.py +++ b/badtests.py @@ -166,6 +166,13 @@ h1{color:#f85149;font-size:24px;margin-bottom:4px} h1 span{font-size:14px;color:#484f58;font-weight:normal} h2{color:#58a6ff;font-size:18px;margin:30px 0 12px;padding-bottom:6px;border-bottom:1px solid #21262d} .desc{color:#8b949e;font-size:13px;margin-bottom:20px} +.toc{background:#161b22;border:1px solid #30363d;border-radius:6px;padding:16px 20px;margin:20px 0} +.toc-title{color:#58a6ff;font-size:15px;margin-bottom:8px;font-weight:bold} +.toc ul{list-style:none;columns:2;column-gap:24px} +.toc li{padding:2px 0} +.toc a{color:#c9d1d9;text-decoration:none;font-size:13px} +.toc a:hover{color:#58a6ff;text-decoration:underline} +.toc .count{color:#484f58;font-size:12px} .card{background:#161b22;border:1px solid #30363d;border-radius:6px;padding:16px;margin-bottom:16px} .card:hover{border-color:#58a6ff} .card h3{margin:0 0 4px} @@ -181,6 +188,8 @@ code{color:#e6edf3} .special a{color:#f85149;font-weight:bold;text-decoration:none} .special a:hover{text-decoration:underline} footer{margin-top:40px;padding-top:16px;border-top:1px solid #21262d;color:#484f58;font-size:12px} +footer a{color:#484f58;text-decoration:none} +footer a:hover{color:#58a6ff;text-decoration:underline}

☠ badtests — malicious HTTP response server

@@ -188,11 +197,21 @@ footer{margin-top:40px;padding-top:16px;border-top:1px solid #21262d;color:#484f Click any endpoint to hit it directly.

📋 /logs — View all visitor IPs, user agents, headers, and timestamps
''' + # Build table of contents + h += '
Table of Contents
\n' + for cat_name, prefix in CATEGORIES: + tests_in_cat = [t for t in TESTS if t[0].startswith(prefix)] + if not tests_in_cat: + continue + anchor = cat_name.lower().replace(' ', '-').replace('/', '-') + h += f'

{html.escape(cat_name)}

\n' for path, title, desc in tests_in_cat: crit = '🚨' in desc warn = '⚠️' in desc @@ -209,7 +228,7 @@ Click any endpoint to hit it directly.

''' h += f''' ''' return h.encode() @@ -233,8 +252,8 @@ JS_DOWNLOAD = b'''Download bomb

Triggering 200 simultaneous downloads...

''' JS_CLIPBOARD = b'''Clipboard hijack @@ -721,7 +740,7 @@ class Handler(http.server.BaseHTTPRequestHandler): elif p == '/html-multiline-title': self._r(200, {'Content-Type': 'text/html'}, b'Line 1\nLine 2\nLine 3\nLine 4\nLine 5

Check your tab title

') elif p == '/html-irc-title': - self._r(200, {'Content-Type': 'text/html'}, b'Normal Title\r\nQUIT :Hacked by malserv\r\nPRIVMSG #channel :pwned

IRC Injection via HTML title

') + self._r(200, {'Content-Type': 'text/html'}, b'Normal Title\r\nQUIT :Hacked by badtests\r\nPRIVMSG #channel :pwned

IRC Injection via HTML title

') elif p == '/html-unicode': chars = ''.join(chr(random.randint(0x1000, 0x3000)) for _ in range(500)) self._r(200, {'Content-Type': 'text/html; charset=utf-8'}, f'{chars}

{chars}

'.encode()) @@ -730,7 +749,7 @@ class Handler(http.server.BaseHTTPRequestHandler): # --- Terminal abuses --- elif p == '/ansi-chaos': a = '\033[2J\033[H' - a += '\033]0;HACKED BY MALSERV\007' + a += '\033]0;HACKED BY BADTESTS\007' a += '\033[?25l' for i in range(80): row = random.randint(1, 50)