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
- h += f'{html.escape(cat_name)} \n'
+ anchor = cat_name.lower().replace(' ', '-').replace('/', '-')
+ h += f'{html.escape(cat_name)} ({len(tests_in_cat)}) \n'
+ h += ' \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'''
☠ badtests — {len(TESTS)} endpoints on port {PORT}
-python3 badtests.py to start
+made by acidvegas