diff --git a/src/handler.py b/src/handler.py
index 01d1f11..6a4b969 100644
--- a/src/handler.py
+++ b/src/handler.py
@@ -249,18 +249,19 @@ class Handler(BaseHTTPRequestHandler):
self.wfile.write(api_response('/api/config').encode())
return True
- if path in ['/admin', '/admin/', '/admin/login', '/login', '/wp-login.php']:
+ if path in ['/admin', '/admin/', '/admin/login', '/login']:
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
self.wfile.write(html_templates.login_form().encode())
return True
- if path == '/wp-admin' or path == '/wp-admin/':
+ # WordPress login page
+ if path in ['/wp-login.php', '/wp-login', '/wp-admin', '/wp-admin/']:
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
- self.wfile.write(html_templates.login_form().encode())
+ self.wfile.write(html_templates.wp_login().encode())
return True
if path in ['/wp-content/', '/wp-includes/'] or 'wordpress' in path.lower():
diff --git a/src/templates/html/phpmyadmin.html b/src/templates/html/phpmyadmin.html
index 870281a..e2a0ade 100644
--- a/src/templates/html/phpmyadmin.html
+++ b/src/templates/html/phpmyadmin.html
@@ -1,24 +1,286 @@
-
+
+
+
+
phpMyAdmin
+
-
-
-
MySQL Server Login
-
+
-
\ No newline at end of file
+
diff --git a/src/templates/html/wp_login.html b/src/templates/html/wp_login.html
new file mode 100644
index 0000000..38b8fe5
--- /dev/null
+++ b/src/templates/html/wp_login.html
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+
Log In ‹ WordPress — WordPress
+
+
+
+
+
+
+
diff --git a/src/templates/html_templates.py b/src/templates/html_templates.py
index 69f562b..c6ad09a 100644
--- a/src/templates/html_templates.py
+++ b/src/templates/html_templates.py
@@ -28,6 +28,11 @@ def phpmyadmin() -> str:
return load_template("phpmyadmin")
+def wp_login() -> str:
+ """Generate fake WordPress login page"""
+ return load_template("wp_login")
+
+
def robots_txt() -> str:
"""Generate juicy robots.txt"""
return load_template("robots.txt")
diff --git a/src/templates/template_loader.py b/src/templates/template_loader.py
index 3faf61b..fd1febc 100644
--- a/src/templates/template_loader.py
+++ b/src/templates/template_loader.py
@@ -40,6 +40,9 @@ def load_template(name: str, **kwargs) -> str:
>>> load_template("robots.txt") # Loads html/robots.txt
>>> load_template("directory_listing", path="/var/www", rows="
... ")
"""
+ # debug
+ # print(f"Loading Template: {name}")
+
# Check cache first
if name not in _template_cache:
# Determine file path based on whether name has an extension
@@ -58,7 +61,6 @@ def load_template(name: str, **kwargs) -> str:
# Apply substitutions if kwargs provided
if kwargs:
template = template.format(**kwargs)
-
return template