方法1,简单不过不全
安装最新版 whois
wget http://ftp.apnic.net/apnic/dbase/tools/ripe-dbase-client-v3.tar.gz
tar xzvf ripe-dbase-client-v3.tar.gz
cd whois-3.1
./configure
make
cat run.sh 脚本
/home/mj/whois-3.1/whois3 -h whois.apnic.net -l -i mb MAINT-CN-CRTC | grep "descr" | grep "Reverse" | awk -F "for" '{if ($2!="") print $2}'| sort -n | awk 'BEGIN{print "acl /"CRTC/" '{'"}{print $1";"}END{print "'}';"}' > crtc_acl.conf
/home/mj/whois-3.1/whois3 -h whois.apnic.net -l -i mb MAINT-CNCGROUP | grep "descr" | grep "Reverse" | awk -F "for" '{if ($2!="") print $2}'| sort -n | awk 'BEGIN{print "acl /"CNC/" '{'"}{print $1";"}END{print "'}';"}' > cnc_acl.conf
/home/mj/whois-3.1/whois3 -h whois.apnic.net -l -i mb MAINT-CHINANET | grep "descr" | grep "Reverse" | awk -F "for" '{if ($2!="") print $2}'| sort -n | awk 'BEGIN{print "acl /"TELECOM/" '{'"}{print $1";"}END{print "'}';"}' > telecom_acl.conf
方法2,速度慢,不过齐全
php ip.php 运行脚本