V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Jun 27, 2019 · 2251 views
    This topic created in 2509 days ago, the information mentioned may be changed or developed.
    源码在:
    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 replies    2019-06-28 07:39:17 +08:00
    dontaskcece
        1
    dontaskcece  
       Jun 28, 2019
    目前在用 caddy 的插件,哈哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   873 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:39 · PVG 05:39 · LAX 14:39 · JFK 17:39
    ♥ Do have faith in what you're doing.