#!/usr/bin/env python3
# Serves attacker.html on http://127.0.0.1:8080/ for the manual web-content
# variant of the cross-domain-password keyjacking POC.
import http.server, socketserver, os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
PORT = 18000
socketserver.TCPServer.allow_reuse_address = True
class H(http.server.SimpleHTTPRequestHandler):
    def end_headers(self):
        self.send_header('Cache-Control', 'no-store')
        super().end_headers()
with socketserver.TCPServer(('127.0.0.1', PORT), H) as httpd:
    print(f'Serving on http://127.0.0.1:{PORT}/attacker.html')
    httpd.serve_forever()
