month=`date +%m`
day=`date +%d`
year=`date +%Y`
echo "Hello world - sh.jsrun.net"
echo ${year}年$month月$day日,国家工业互联网安全技术保障平台江苏分平台巡检日报 >> out.txt
echo 一、部省对接监测情况 >> out.txt
count1=100
count2=200
count3=300
count4=400
((count=$count1+$count2+$count3+$count4))
echo ${count}
test=${year}年$month月$day日,
if test -z $count
then test=${test}上报部平台日志0条,未上报原因待核查。
else
test=${test}共上报部平台日志$count条,其中
if test -n count1
then test=${test}事件1${count1}条
fi
if test -n count2
then test=${test}事件2${count2}条
fi
if test -n count3
then test=${test}事件3${count3}条
fi
if test -n count4
then test=${test}事件4${count4}条
fi
test=${test}。
fi
echo ${test} >> out.txt
echo 二、网络安全监测情况 >> out.txt
echo 1、DDoS攻击监测情况 >> out.txt
count=100
test=${year}年$month月$day日,
if test -z $count
then test=$test未监测发现工业互联网企业受到的峰值流量超过20Gbps且持续10分钟以上的DDoS攻击事件。
else
dwmc="单位1,单位2,单位3"
test=$test监测发现工业互联网企业受到的峰值流量超过20Gbps且持续10分钟以上的DDoS攻击事件${count}起(其中涉及${dwmc}等),
maxvalue=100
test=$test最大峰值攻击流量为${maxvalue}Gpbs。
fi
echo ${test} >> out.txt
echo "2.虚拟币挖矿监测情况">> out.txt
count=100
test=${year}年$month月$day日,
if test -z $count
then test=$test未监测发现工业互联网企业虚拟币挖矿IP地址。
else
test=$test监测发现到工业互联网企业虚拟货币挖矿IP地址$count个
addcount=50
test=$test(今日新增IP地址${addcount}个)。
fi
echo ${test} >> out.txt
echo "3.网络安全成功事件监测情况">> out.txt
test=${year}年$month月$day日,
count=100
if test -z $count
then test=$test未监测发现到网络安全成功事件。
else
test=$test监测发现到${count}条网络安全成功事件,
dwcount=50
test=$test涉及$dwcount家工业互联网企业,
tcgxdwcount=30
test=$test其中${tcgxdwcount}家突出贡献企业
tcgxdw="单位1,单位2,单位3"
test=$test(涉及$tcgxdw等)、
bsjxdwcount=30
test=$test${bsjxdwcount}家工业互联网标识解析企业
bsjxdw="单位1,单位2,单位3"
test=$test(涉及$bsjxdw等)、
gxptdwcount=20
test=$test${gxptdwcount}家工业互联网平台企业
gxptdw="单位1,单位2,单位3"
test=$test(涉及$gxptdw等)、
gsdwcount=10
test=$test${gxptdwcount}家规上企业
test=$test。
fi
echo ${test} >> out.txt
cat out.txt