V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
brightman
V2EX  ›  Python

一个简单的带 basic auth 验证的文件共享服务

  •  
  •   brightman · 2019-06-27 19:29:22 +08:00 · 1292 次点击
    这是一个创建于 1736 天前的主题,其中的信息可能已经有所发展或是发生改变。
    源码在:
    https://github.com/brightman/dumbo/blob/master/client/dumbo.py
    用法如下:
    python3 client/dumbo.py -a admin1:admin1
    -a 验证的用户名密码
    -d 需要共享的目录

    其实就是简单修改了一下 python3 自己的 SimpleHTTPRequestHandler,如果结合 ngrok 使用,你可以很方便在本地起一个文件共享服务,临时让别人下载。
    差不多 6 年没编码了,如果有错误见谅。

    v2ex 怎么上传图片?好久没用了~
    1 条回复    2019-06-28 07:39:17 +08:00
    dontaskcece
        1
    dontaskcece  
       2019-06-28 07:39:17 +08:00
    目前在用 caddy 的插件,哈哈哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4086 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 05:23 · PVG 13:23 · LAX 22:23 · JFK 01:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.