szopen
V2EX  ›  Google

写了一个 Google 可用 IP 获取的脚本,自动生成 named zone 配置文件

  •  
  •   szopen · Dec 28, 2014 · 5255 views
    This topic created in 4180 days ago, the information mentioned may be changed or developed.

    python版本http://toknot.com/download/getGoogleIp.py
    php版本http://toknot.com/download/getGoogleIp.php
    两个脚本会在运行目录创建一个文件夹,会在该文件夹下创建named zone配置文件及IP可用域名列表

    Supplement 1  ·  Dec 28, 2014
    两个脚本目前只在Linux下测试通过,另外在当本地DNS设置有问题时,将会使用系统的nslookup命令
    Supplement 2  ·  Dec 28, 2014
    脚本需要在命令行运行
    php getGoogleIp.php
    或者
    python getGoogleIp.py
    7 replies    2014-12-28 14:31:26 +08:00
    Saber
        1
    Saber  
       Dec 28, 2014
    php的好像用不了?
    xyzsss
        2
    xyzsss  
       Dec 28, 2014
    http://serve.netsh.org/pub/gethosts.php
    这个对你可能有帮助。
    lzxgh621
        3
    lzxgh621  
       Dec 28, 2014
    谷歌的IP真的是太多了,感觉封都封不完。= =
    rtfkill
        4
    rtfkill  
       Dec 28, 2014
    直接python getGoogleIp.py能用么?
    aekt5716
        5
    aekt5716  
       Dec 28, 2014 via Android
    速度是硬伤
    szopen
        6
    szopen  
    OP
       Dec 28, 2014   ❤️ 1
    @Saber PHP版本需要pcntl扩展
    @rtfkill 可以用,我是测试了python 2.7.5与3.3.2版本可用
    pubby
        7
    pubby  
       Dec 28, 2014
    运行一次要多久? PHP版
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2889 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 00:23 · PVG 08:23 · LAX 17:23 · JFK 20:23
    ♥ Do have faith in what you're doing.