Skip to content

Instantly share code, notes, and snippets.

@goya191
goya191 / SimpleHttpsAuthServer.py
Last active August 12, 2016 15:12 — forked from fxsjy/SimpleAuthServer.py
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import os
import base64
import ssl
import SocketServer
key = ""
# generate cert with openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes