#!/usr/bin/env python3
"""Minimal HTTP server for the PasswordGenerationAgent AutoReset UAF POC."""
import http.server
import os
import socketserver

PORT = 9001
os.chdir(os.path.dirname(os.path.abspath(__file__)))

class Handler(http.server.SimpleHTTPRequestHandler):
    def log_message(self, fmt, *args):
        pass  # quiet

socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(("127.0.0.1", PORT), Handler) as httpd:
    print(f"[server] serving on http://127.0.0.1:{PORT}/poc.html?poc-uaf-autoreset")
    httpd.serve_forever()
