Last active
June 24, 2016 13:03
-
-
Save hummus/1047d5efa95d4b71e8fb5d9872314023 to your computer and use it in GitHub Desktop.
SimpleHTTPSServer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SimpleHTTPServer oneliner | |
openssl req -new -x509 -keyout /dev/stdout -out /dev/stdout -days 365 -nodes -subj "/C=XX/O=Default Company Ltd" 2>/dev/null > yourpemfile.pem ; python -c 'import sys, BaseHTTPServer, SimpleHTTPServer; import ssl; httpd = BaseHTTPServer.HTTPServer(("0.0.0.0", 4443), SimpleHTTPServer.SimpleHTTPRequestHandler); httpd.socket = ssl.wrap_socket (httpd.socket, server_side=True, certfile=sys.argv[1]); httpd.serve_forever()' yourpemfile.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment