马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!<divclass="post_content_text"style="border-style:nonenonedashed;border-bottom-width:1px;border-bottom-color:rgb(170,170,170);list-style:none;margin:0px0px5px;padding:3px6px;font-family:微软雅黑;font-size:13px;line-height:22px;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">先容一个壮大的剖析收集的shell剧本,此剧本是从EZHTTP拆分出来的,以为有需要独自先容下。
剧本运转效果截图:
此剧本包括的功效有:
- 1、及时监控恣意网卡的流量
- 2、统计10秒内均匀流量
- 3、统计每一个端口在10秒内的均匀流量,基于客户端和办事端端口统计。能够看出哪些端口占流量对照年夜,关于web办事器,通常为80端口。别的端口遭到打击时,也有大概别的端口流量对照年夜。以是此功效能够匡助我们端口流量是不是一般。
- 4、统计在10s内占用带宽最年夜的前10个ip。此项功效能够匡助我们来查出是不是有歹意占用带宽的ip。
- 5、统计毗连形态。此项功效可让我们看出哪些毗连形态对照年夜。假如SYN-RECV形态对照多的话,有能够遭到半毗连打击。假如ESTABLISED十分年夜,但经由过程日记发明没有那末多哀求,大概经由过程tcpdump发明大批ip只创建毗连不哀求数据的话,多是遭到了全毗连打击,这时候候假如你利用的是nginx办事器,能够在设置文件增添listen80deferred来避免。
- 6、统计各端口毗连形态。当大概遭到打击时,此项功效能够匡助我们发明是哪一个端口遭到打击。
- 7、统计端口为80且形态为ESTAB毗连数最多的前10个IP。此项功效能够匡助我们来找出创立毗连过量的Ip,进而屏障。
- 8、统计端口为80且形态为SYN-RECV毗连数最多的前10个IP。当遭到半毗连打击时,此项功效能够匡助我们找到歹意ip。
用到的收集剖析工具:
- 1、tcpdump:此剧本用tcpdump来统计基于ip或基于端口的流量。
- 2、ss:此剧本用ss下令来统计毗连形态,实践利用发明ss比netstat高效很多。
- 3、/proc/net/dev,用来统计指定网卡的流量。
剧本下载地点:https://www.centos.bz/wp-content/uploads/2014/06/network-analysis.sh
上面贴出完全的剧本:
<divclass="hl-surround"style="border:1pxsolidrgb(195,206,217);list-style:none;margin:0px0px5px;padding:0px;font-family:Fixedsys,BitStreamVeraSansMono,CourierNew,Courier,monospace;width:auto;height:auto;overflow:auto;background:rgb(249,251,252);"><olclass="hl-mainln-show"style="border:none;margin:0px;padding-right:12px;padding-left:56px;font-family:微软雅黑;list-style-position:outside!important;list-style-image:initial!important;background:url(https://www.centos.bz/wp-content/plugins/coolcode/images/hide.gif)5px5pxno-repeattransparent;"title="Doubleclicktohidelinenumber."><liclass="hl-firstline"style="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#!/bin/bash<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#writebyzhumaohai(admin#centos.bz)<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#authorblog:www.centos.bz<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#显现菜单(单选)<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">display_menu(){<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localsoft=$1<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localprompt="which${soft}youdselect:"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">evallocalarr=(${${soft}_arr[@]})<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">whiletrue<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">do<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">echo-e"####################${soft}setting####################
"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">for((i=1;i<=${#arr[@]};i++));doecho-e"$i)${arr[$i-1]}";done<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">echo<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">read-p"${prompt}"$soft<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">evallocalselect=$$soft<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">if["$select"==""]||["${arr[$soft-1]}"==""];then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">prompt="inputerrors,pleaseinputanumber:"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">else<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">eval$soft=${arr[$soft-1]}<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">evalecho"yourselection:$$soft"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">break<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">fi<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">done<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">}<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#把带宽bit单元转换为人类可读单元<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">bit_to_human_readable(){<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#inputbitvalue<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localtrafficValue=$1<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">if[[${trafficValue%.*}-gt922]];then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#convtoKb<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">trafficValue=`awk-vvalue=$trafficValueBEGIN{printf"%0.1f",value/1024}`<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">if[[${trafficValue%.*}-gt922]];then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#convtoMb<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">trafficValue=`awk-vvalue=$trafficValueBEGIN{printf"%0.1f",value/1024}`<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">echo"${trafficValue}Mb"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">else<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">echo"${trafficValue}Kb"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">fi<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">else<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">echo"${trafficValue}b"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">fi<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">}<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#判别保证理工具<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">check_package_manager(){<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localmanager=$1<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localsystemPackage=<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">ifcat/etc/issue|grep-q-E-i"ubuntu|debian";then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">systemPackage=apt<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">elifcat/etc/issue|grep-q-E-i"centos|redhat|redhat";then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">systemPackage=yum<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">elifcat/proc/version|grep-q-E-i"ubuntu|debian";then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">systemPackage=apt<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">elifcat/proc/version|grep-q-E-i"centos|redhat|redhat";then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">systemPackage=yum<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">else<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">echo"unkonw"<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">fi<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">if["$manager"=="$systemPackage"];then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">return0<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">else<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">return1<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">fi<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">}<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#及时流量<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">realTimeTraffic(){<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localeth=""<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localnic_arr=(`ifconfig|grep-E-o"^[a-z0-9]+"|grep-v"lo"|uniq`)<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localnicLen=${#nic_arr[@]}<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">if[[$nicLen-eq0]];then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">echo"sorry,Icannotdetectanynetworkdevice,pleasereportthisissuetoauthor."<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">exit1<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">elif[[$nicLen-eq1]];then<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">eth=$nic_arr<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">else<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">display_menunic<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">eth=$nic<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">fi<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localclear=true<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localeth_in_peak=0<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localeth_out_peak=0<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localeth_in=0<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">localeth_out=0<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;"><listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">whiletrue;do<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">#挪动光标到0:0地位<listyle="border-style:solidnonenonesolid;border-top-width:1px;border-left-width:1px;border-left-color:rgb(195,206,217);border-top-color:rgb(227,238,249)!important;list-style:decimaloutside!important;margin:0px!important;padding:0px0px0px12px!important;font-size:12px!important;line-height:20px!important;background-image:initial;background-attachment:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial;">printf" |