szopen
V2EX  ›  Google

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

  •  
  •   szopen · Dec 28, 2014 · 5660 views
    This topic created in 4335 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
    Saber
    Dec 28, 2014
    1
    php的好像用不了?
    xyzsss
    xyzsss
    Dec 28, 2014
    2
    http://serve.netsh.org/pub/gethosts.php
    这个对你可能有帮助。
    lzxgh621
    lzxgh621
    Dec 28, 2014
    3
    谷歌的IP真的是太多了,感觉封都封不完。= =
    rtfkill
    rtfkill
    Dec 28, 2014
    4
    直接python getGoogleIp.py能用么?
    aekt5716
    aekt5716
    Dec 28, 2014 via Android
    5
    速度是硬伤
    szopen
    szopen
    OP
    Dec 28, 2014❤️1
    6
    @Saber PHP版本需要pcntl扩展
    @rtfkill 可以用,我是测试了python 2.7.5与3.3.2版本可用
    pubby
    pubby
    Dec 28, 2014
    7
    运行一次要多久? PHP版
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   958 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 19:46 · PVG 03:46 · LAX 11:46 · JFK 14:46
    ♥ Do have faith in what you're doing.