portcheck.sh (netcat ¼³Ä¡)
#!/bin/bash
while [ 1 ] ; do
NOW=`date +'%m%d-%H%M-%S'`
FILENAME=server.lists
### "#" ÁÖ¼®Ã³¸®µÈ°Ç Á¦¿ÜÇÏ°í üũ
cat $FILENAME |grep -v "#" |while read a ; do
if nc -z -v -w 1 $a 80 2>&1 |grep -v 'open' ; then
echo "$a Service Port is not checked"
printf "\a\a" ## ¾Ë¶÷
fi
done
sleep 30 ## üũÁÖ±â
done;
server.lists
192.168.0.11
192.168.0.12
¡Ø telnet À̳ª nmapÀº ¼ºñ½º¸¦ üũÇϴµ¥ ÀÖ¾î¼ ¿ÀŽÀÌ Àæ´Ù..