Skip to content

Instantly share code, notes, and snippets.

View vral-parmar's full-sized avatar
🙃
I may be slow to respond.

Viral parmar vral-parmar

🙃
I may be slow to respond.
View GitHub Profile
@stephenbradshaw
stephenbradshaw / https_server_python3.py
Last active January 2, 2026 03:51
Python 3 Simple HTTPS server (versions for above and below python3.7 and helper script to generate certificate)
#!/usr/bin/env python
import http.server
import ssl
# Create certifcate and key: https://github.com/stephenbradshaw/pentesting_stuff/blob/master/example_code/create_self_signed_https_certs.py
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.load_cert_chain(certfile="https_self_signed_cert.pem", keyfile="https_self_signed_key.pem")
httpd = http.server.HTTPServer(('127.0.0.1', 443), http.server.SimpleHTTPRequestHandler)