Skip to content

Instantly share code, notes, and snippets.

@goya191
goya191 / SimpleHttpsAuthServer.py
Last active Aug 12, 2016 — forked from fxsjy/SimpleAuthServer.py
SimpleAuthServer: A SimpleHTTPServer with authentication
View SimpleHttpsAuthServer.py
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