Created
February 10, 2022 06:46
-
-
Save nom3ad/114dc57f1e5b9797316d47e11e4e8322 to your computer and use it in GitHub Desktop.
easy https server
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
mkdir /tmp/www | |
cd /tmp/www; touch "$(hostname).txt" | |
sudo nohup python -m SimpleHTTPServer 80 > simplehttpserver.out & | |
#Start an HTTPS listener with some debug responses (I wonder if you can pipe to the HTTP server) | |
openssl req -x509 -newkey rsa:4096 -nodes -sha256 -keyout /tmp/key.pem -out /tmp/cert.pem -days 365 #Create self signed key. Only need this once and it will ask a few questions | |
sudo nohup openssl s_server -key /tmp/key.pem -cert /tmp/cert.pem -accept 443 -cipher kRSA+RSA -www > openssl.out & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/26790727/one-line-https-server