Simple http server, streaming directories as tarballs.
Project description
Serves directories as .TARs (tarball archives) over http - to be downloaded by a web browser
- tarball_httpd extends pythons http.server/SimpleHTTPServer to serve directories as tarballs
- the goal is to do this without creating the tarball in memory at one time
- as much code as possible has been borrowed from python3’s http.server
Todo
- doublecheck for XSS, LFI, directory traversal vulnerabilities
- add more supported archive files: zip, non compressed zip, gz/gz2, ..
- test on bsd, mac and windows
Install
% pip install tarball_httpd
Usage
% python -m tarball_httpd Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... % python -m tarball_httpd 12345 --bind 127.0.0.1 --directory /tmp Serving HTTP on 127.0.0.1 port 12345 (http://127.0.0.1:12345/) .. % python -m tarball_httpd -h usage: tarball_httpd.py [-h] [--bind ADDRESS] [--directory DIRECTORY] [port] positional arguments: port Specify alternate port [default: 8000] optional arguments: -h, --help show this help message and exit --bind ADDRESS, -b ADDRESS Specify alternate bind address [default: all interfaces] --directory DIRECTORY, -d DIRECTORY Specify alternative directory [default:current directory]
Usage without installation
% git clone git@github.com:zrthstr/tarball_httpd.git % cd tarball_httpd % ./tarball_httpd.py Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
Testing
% ./tests/test.sh
License
This project is licensed under the PSF License - see the LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size tarball_httpd-0.0.3-py3-none-any.whl (6.6 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size tarball_httpd-0.0.3.tar.gz (5.0 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for tarball_httpd-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee605582f579826bba56ff042365b9a76ef9c72b57489e524216e03f33df34e5 |
|
MD5 | d3fb8d34c7d9472ac79b952a8ad3b814 |
|
BLAKE2-256 | cab5cc8a7c4a8583272b03ecfe86155b982ea3227744eba3e632dee5506c0dd0 |