#!/usr/bin/env python3
"""Serves attacker.html / victim.html on 0.0.0.0:8080 for the iOS device."""
import http.server
import os
import socketserver

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


class Handler(http.server.SimpleHTTPRequestHandler):
    def end_headers(self):
        self.send_header("Cache-Control", "no-store")
        super().end_headers()


socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(("0.0.0.0", PORT), Handler) as httpd:
    print(f"Serving POC on http://0.0.0.0:{PORT}/attacker.html")
    httpd.serve_forever()
