仓酷云

标题: 来一发shell猎取国际各年夜运营商网段剧本 [打印本页]

作者: 爱飞    时间: 2015-1-14 20:14
标题: 来一发shell猎取国际各年夜运营商网段剧本
欢迎大家来到仓酷云论坛!亚太区域收集信息纪录在这里,天天都有更新。
http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest

上面这个剧本将对这段文本举行编纂,输入国际几年夜运营商网段。

#!/bin/sh
#autogettheIPTable
#getthenewestdelegated-apnic-latest
rmdelegated-apnic-latest

iftypewget
thenwgethttp://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest
elsefetchhttp://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest
fi
grepapnic|CN|ipv4delegated-apnic-latest|cut-f4,5-d||tr||whilereadipcnt
do
mask=$(bc<<END|tail-1
pow=32;
definelog2(x){
if(x<=1)return(pow);
pow--;
return(log2(x/2));
}
log2($cnt);
END
)
echo$ip/$mask;>>cnnet

resultext=`whois$ip@whois.apnic.net|grep-e^netname-e^descr-e^role-e^mnt-by|cut-f2-d:|seds/*//`

ifecho$resultext|grep-i-erailcom-ecrtc-erailway
thenecho$ip/$mask;>>crc
elifecho$resultext|grep-i-ecncgroup-enetcom
thenecho$ip/$mask;>>cnc
elifecho$resultext|grep-i-echinanet-echinatel
thenecho$ip/$mask;>>telcom_acl
elifecho$resultext|grep-i-eunicom
thenecho$ip/$mask;>>unicom
elifecho$resultext|grep-i-ecmnet
thenecho$ip/$mask;>>cmnet
else
echo$ip/$mask;>>other_acl
fi

done

如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!
作者: 不帅    时间: 2015-1-15 07:44
标题: 来一发shell猎取国际各年夜运营商网段剧本
前排顶,很好!
作者: 简单生活    时间: 2015-1-22 07:51
Linux操作系统这个名词记得在很早以前就听过,但当时并不知道具体是什么样的操作系统,只知道是一个与嵌入式密切相关的操作系统。
作者: 冷月葬花魂    时间: 2015-2-6 17:59
感谢老师和同学们在学习上对我的帮助。
作者: 透明    时间: 2015-2-18 02:48
现在的linux操作系统如redhat,难点,红旗等,都是用这么一个内核,加上其它的用程序(包括X)构成的。
作者: 老尸    时间: 2015-3-6 02:04
要增加自己Linux的技能,只有通过实践来实现了。所以,赶快找一部计算机,赶快安装一个Linux发行版本,然后进入精彩的Linux世界,相信对于你自己的Linux能力必然大有斩获。
作者: 分手快乐    时间: 2015-3-12 20:44
任何一个叫做操作系统的东西都是这样子构成的:内核+用户界面+一般应用程序。
作者: 若相依    时间: 2015-3-20 04:47
你需要提供精确有效的信息。Linux这并不是要求你简单的把成吨的出错代码或者数据完全转储摘录到你的提问中。




欢迎光临 仓酷云 (http://ckuyun.com/) Powered by Discuz! X3.2