Skip to content

Instantly share code, notes, and snippets.

@hummus
Last active June 24, 2016 13:03
Show Gist options
  • Select an option

  • Save hummus/1047d5efa95d4b71e8fb5d9872314023 to your computer and use it in GitHub Desktop.

Select an option

Save hummus/1047d5efa95d4b71e8fb5d9872314023 to your computer and use it in GitHub Desktop.

Revisions

  1. hummus renamed this gist Jun 24, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. hummus created this gist May 5, 2016.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # 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