https://github.com/samrocketman/simplehttpsserver
A hacked version of Python SimpleHTTPServer to provide quick HTTPS file sharing.
https://github.com/samrocketman/simplehttpsserver
Last synced: 20 days ago
JSON representation
A hacked version of Python SimpleHTTPServer to provide quick HTTPS file sharing.
- Host: GitHub
- URL: https://github.com/samrocketman/simplehttpsserver
- Owner: samrocketman
- Created: 2013-11-11T19:48:16.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2020-10-18T07:11:41.000Z (over 5 years ago)
- Last Synced: 2025-01-06T10:13:24.343Z (over 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleHTTPSServer
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.
## Prerequisites
In addition to Python 2.6 or Python 2.7 you need to have [pyOpenSSL installed](https://launchpad.net/pyopenssl/)
## Installation
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
## Usage
python -m SimpleHTTPSServer
1. Start the https server by simply running SimpleSecureHTTPServer.py for the desired version of Python (2.6 or 2.7).
2. Visit `https://localhost:8000/` or `https://yourhost.yourdomain.com:8000`
Note: Other versions of python are untested but still may work.
# References
Originally obtained from [active state](http://code.activestate.com/recipes/442473-simple-http-server-supporting-ssl-secure-communica/)
This is a modification of [Python 2.6 SimpleHTTPServer](http://docs.python.org/release/2.6.8/library/simplehttpserver.html) and [Python 2.7 SimpleHTTPServer](http://docs.python.org/library/simplehttpserver.html)
There is a pyOpenSSL bug where it does not work properly with socket in Python 2.7.
* https://bugs.launchpad.net/pyopenssl/+bug/686804
* https://bugs.launchpad.net/pyopenssl/+bug/755852
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!