简单的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文件

作者和致谢

它的部分代码是基于python3/lib/http/server或从python3/lib/http/server复制的

tarball是由zrth1k@gmail.com

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java SUN次要代码309含义   java避免为空元素生成XML自关闭标记,并生成自定义的<XML>开始标记   java使用json和restful将数组数据从本地sqlite数据库插入SQL Server   java Spring Boot 1.5.9字符编码问题   LInkedIn讨论中的java 401错误   位图Java:检查多个位向量/位集是否相交的最快方法?   macos如何让Java应用程序以图标出现在Mac OS X dock中   java如何删除netbeans中的@SuppressWarnings(“未使用的”)?   apachestorm中的java自定义序列化   java可以退出代码还是应该终止main?   递归如何在Java中递归地绘制简单的线条?   unicode在Java中确定特定字体是否可以呈现特定字符   打开并阅读带有Selenium/Katalon(Java)特定标题的电子邮件文本(来自Gmail)