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

强力推荐一个对付运营商DNS劫持的工具,请低调使用

  •  
  •   18m · May 11, 2012 · 7847 views
    This topic created in 5140 days ago, the information mentioned may be changed or developed.
    一个很简单的python脚本,监听本地DNS请求,以TCP方式去获取并返回。
    具体不多讲,聪明的你自己来领会。

    github地址
    https://github.com/henices/Tcp-DNS-proxy

    = How to use this python script ?


    1) change your dns server to 127.0.0.1
    $ vi /etc/resolve.conf
    nameserver 127.0.0.1

    2) restart the network
    $ sudo /etc/init.d/networking restart

    3) run the script
    $ sudo python tcpdns.py
    7 replies    1970-01-01 08:00:00 +08:00
    kojp
        1
    kojp  
       May 11, 2012
    哈哈,仔细看了一下。终于有我能看懂的代码了。。呵呵。
    gDD
        2
    gDD  
       May 11, 2012
    楼主写的?加个License吧。
    est
        3
    est  
       May 11, 2012
    tcp解析效率不行。要做一个cache才好用。
    eerie
        4
    eerie  
       May 11, 2012
    114dns就挺好用的,感觉做这个没什么必要啊,特别是海外的那几个dns访问速度比较慢
    不过精神上支持下

    另外看到个
    print '>> Please wait program init....'
    print '>> Init finished!'
    print '>> Now you can set dns server to 127.0.0.1'
    这个好蛋疼啊.......
    18m
        5
    18m  
    OP
       May 11, 2012
    抱歉我没有讲清楚。
    这是在github上翻到的,经过试用不错,所以拿来分享。不是我的创造,不敢造次。
    meteor
        6
    meteor  
       May 11, 2012
    OpenDNS的这个也是可以的.
    Linux,Mac,Windows版皆有.
    https://github.com/opendns/dnscrypt-proxy
    18m
        7
    18m  
    OP
       May 11, 2012
    @est 能介绍一下为什么效率不行么? 我不是很懂这方面。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2550 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 01:38 · PVG 09:38 · LAX 18:38 · JFK 21:38
    ♥ Do have faith in what you're doing.