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
xiayibu
V2EX  ›  Python

哪位朋友知道如何用 Python 控制 centos ADSL 拨号换 IP

  •  
  •   xiayibu · Jun 15, 2017 · 3279 views
    This topic created in 3242 days ago, the information mentioned may be changed or developed.
    7 replies    2017-06-16 08:11:33 +08:00
    laoyur
        1
    laoyur  
       Jun 15, 2017
    目测楼主在做拨号 vps 方案
    os.system 调一下 shell 进行重拨不行?
    xiayibu
        2
    xiayibu  
    OP
       Jun 15, 2017
    @laoyur 可以提供具体代码吗
    laoyur
        3
    laoyur  
       Jun 15, 2017   ❤️ 1
    代码不是很直白嘛

    事先配置好 pppoe 参数
    ```
    os.system('ifdown ppp0')
    os.system('ifup ppp0')
    # 此时就已经拨号成功了呗
    ```
    onion83
        4
    onion83  
       Jun 15, 2017   ❤️ 1
    xiayibu
        5
    xiayibu  
    OP
       Jun 15, 2017
    @onion83 谢谢
    yanzixuan
        6
    yanzixuan  
       Jun 15, 2017
    一看就知道是搞爬虫哦的。
    KgM4gLtF0shViDH3
        7
    KgM4gLtF0shViDH3  
       Jun 16, 2017 via Android
    @yanzixuan 搞爬虫为啥不用代理 ip,也不贵
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2418 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 11:06 · PVG 19:06 · LAX 04:06 · JFK 07:06
    ♥ Do have faith in what you're doing.