It's like a secure pastebin but for files! Run this command anywhere and you instantly have secure file sharing (assuming you set up signed certificates before hand) based on the current working directory of the command. Also be aware that port 8000 will be open for all interfaces so it is assumed you will lock your system down with a firewall and only share to specific IP addresses or IP ranges using a firewall like iptables.
In addition to Python 2.6 or Python 2.7 you need to have pyOpenSSL installed
Copy the version of SimpleHTTPSServer you want to use to the python modules directory. e.g.
cp SimpleHTTPSServer.py /usr/lib/python2.7/SimpleHTTPSServer.py
python -m SimpleHTTPSServer
- Start the https server by simply running SimpleSecureHTTPServer.py for the desired version of Python (2.6 or 2.7).
- Visit
https://localhost:8000/orhttps://yourhost.yourdomain.com:8000
Note: Other versions of python are untested but still may work.
Originally obtained from active state
This is a modification of Python 2.6 SimpleHTTPServer and Python 2.7 SimpleHTTPServer
There is a pyOpenSSL bug where it does not work properly with socket in Python 2.7.
I wrote a workaround which is applied in the Python 2.7 directory to account for this. Now we have the best of both worlds and it works with Python 2.7!