APNIC database 的中国IP段

回复 收藏
get apnic ip list
# wget http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest

split CN address
# grep 'CN|ipv4' delegated-apnic-latest >/tmp/cnip.txt

whois CN address ,get address info
# for ip in `cut -d\| -f4 /tmp/cnip.txt`; do whois $ip >/tmp/CNIP/$ip; echo $ip; done

analyz address info ,get ip pool
# for i in /tmp/CNIP/*; do grep inetnum $i|head -n 1 >> /tmp/cnippool.txt; done

# awk '{print $2"-"$4}' /tmp/cnippool.txt >/tmp/cnippool2.txt
2010-02-26 10:27 举报
已邀请:

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: