#!/bin/bash
if [ "$1" == "" ]
then
160; 160; 160; 160; v=10
160; 160; 160; 160; echo -e "\n loop is $v syn_recv checking!!!"
160; 160; 160; 160; echo -e " example) ./syn_check.sh loop_number"
160; 160; 160; 160; echo -e " after 3 second, and starting... "
160; 160; 160; 160; sleep 3
else
160; 160; 160; 160; v=$1
160; 160; 160; 160; r=${v//[0-9]/}
160; 160; 160; 160; if [ -z "$r" ]; then
160; 160; 160; 160; 160; 160; 160; 160; echo -e "\n loop is $v syn_recv checking!!!"
160; 160; 160; 160; 160; 160; 160; 160; echo -e " after 3 second, and starting... \n"
160; 160; 160; 160; 160; 160; 160; 160; sleep 3
160; 160; 160; 160; else
160; 160; 160; 160; 160; 160; 160; 160; echo -e "\n $v is not number. and loop is 10"
160; 160; 160; 160; 160; 160; 160; 160; v=10
160; 160; 160; 160; 160; 160; 160; 160; echo -e " after 3 second, and starting... "
160; 160; 160; 160; 160; 160; 160; 160; sleep 3
160; 160; 160; 160; fi
fi
i=1
while [ $i -le $v ]
do
160; 160; 160; 160; # # netstat syn_recv check
160; 160; 160; 160; echo -e "\n #loop 160;count - $i "
160; 160; 160; 160; echo -e " netstat -anp | grep -i syn_recv "
160; 160; 160; 160; echo -e " --------------------------------"
160; 160; 160; 160; STR1=`netstat -anp | grep -i syn_recv`
160; 160; 160; 160; echo -e "$STR1"
160; 160; 160; 160; if [ 160;$i -lt $v ];then echo -e "\n waiting 1 second...";fi
160; 160; 160; 160; sleep 1
160; 160; 160; 160; i=$(($i+1))
done
echo -e 160;"\n"
2cpu의 도움주신 많은 분들께 늘 감사드립니다.
☎ HP 010-9678-7900
ÀÌ°ÍÀº Syn Flooding µðµµ½º °ø°Ý¿¡ syn_recv °¡ ¾î¶»°Ô µé¾î¿À°í ÀÖ´ÂÁö
¿øÇÏ´Â ¹Ýº¹È½¼ö ¸¸Å¸¸ ·çÇÁ¸¦ µ¹¸®¸é¼ º¸¿©ÁÝ´Ï´Ù.
±âº» µðÆúÆ®°ªÀº 10ȸ ÀÌ°í
¿øÇϴ Ƚ¼ö¸¦ ÆĶó¹ÌÅÍ·Î ÀÔ·ÂÇÏ¸é µË´Ï´Ù.
./syn_loop_check.sh 100 ÀÌ·±½ÄÀ¸·Î...¤¾¤¾¤¾