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
# 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
编辑回复