推荐学习书目
› 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
t333st
V2EX  ›  Python

请教下大佬们关于 socks.wrapmodule 的问题

  •  
  •   t333st · Sep 21, 2018 · 2264 views
    This topic created in 2970 days ago, the information mentioned may be changed or developed.
    def btest():
        socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '58.243.107.xx', 4365)
        socks.wrapmodule(smtplib)
        burl = 'http://www.ip138.com/ips1388.asp'
        resp1 = requests.get(burl).text
        print(resp1)
    

    代码如上,resp1 的结果 ip 是'58.243.107.xx'
    为何在使用 socks.wrapmodule(smtplib)后会影响 requests 的使用
    或者说,有办法避免或解决这个 bug 的好方案吗?
    菜鸟一枚,各位轻虐

    3 replies  •  2018-09-23 12:34:18 +08:00
    Septembers
    Septembers
    Sep 22, 2018 via Android
    1
    socks 是什么库?
    你自己审计过源码吗?
    t333st
    t333st
    OP
    Sep 22, 2018
    2
    @Septembers 使用一个库就要阅读审计一个库的源码?
    lolizeppelin
    lolizeppelin
    Sep 23, 2018 via Android
    3
    难道你们都不看源码的 23333
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1351 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 15:33 · PVG 23:33 · LAX 07:33 · JFK 10:33
    ♥ Do have faith in what you're doing.