简单的http服务器,流目录为tarballs。
tarball-httpd的Python项目详细描述
通过http将目录用作.tars(tarball存档文件)-可通过Web浏览器下载
- tarball_httpd扩展pythons http.server/simplehtpserver以提供服务 作为tarballs的目录
- 我们的目标是做到这一点,而不是在记忆中一次性创建tarball 时间
- 尽可能多的代码是从python3的http.server中借用的
待办事项
- 双重检查XSS、LFI、目录遍历漏洞
- 添加更多受支持的存档文件:zip、非压缩zip、gz/gz2、…
- 在BSD、Mac和Windows上进行测试
安装
% pip install tarball_httpd
用法
% 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]
不用安装即可使用
% 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/) ...
测试
% ./tests/test.sh
许可证
此项目是在psf许可下授权的-有关详细信息,请参见LICENSE文件