#!/usr/bin/env python3 """ HTML templates for the deception server. Edit these templates to customize the appearance of fake pages. """ def login_form() -> str: """Generate fake login page""" return """ Admin Login

Admin Login

""" def login_error() -> str: """Generate fake login error page""" return """ Login Failed

Admin Login

ERROR: Invalid username or password.

Forgot your password?

""" def wordpress() -> str: """Generate fake WordPress page""" return """ My Blog – Just another WordPress site

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

About This Site

This is a sample page. You can use it to write about your site, yourself, or anything else you'd like.

""" def phpmyadmin() -> str: """Generate fake phpMyAdmin page""" return """ phpMyAdmin

phpMyAdmin

MySQL Server Login

""" def robots_txt() -> str: """Generate juicy robots.txt""" return """User-agent: * Disallow: /admin/ Disallow: /api/ Disallow: /backup/ Disallow: /config/ Disallow: /database/ Disallow: /private/ Disallow: /uploads/ Disallow: /wp-admin/ Disallow: /phpMyAdmin/ Disallow: /admin/login.php Disallow: /api/v1/users Disallow: /api/v2/secrets Disallow: /.env Disallow: /credentials.txt Disallow: /passwords.txt Disallow: /.git/ Disallow: /backup.sql Disallow: /db_backup.sql """ def directory_listing(path: str, dirs: list, files: list) -> str: """Generate fake directory listing""" html = f""" Index of {path}

Index of {path}

""" for d in dirs: html += f'\n' for f, size in files: html += f'\n' html += '
NameLast ModifiedSize
Parent Directory--
{d}2024-12-01 10:30-
{f}2024-12-01 14:22{size}
' return html