修改DNS探测网站




service nscd stop






#!/bin/bash

a=`date +%F-%H-%M`;

while read LINE;
do     
sed -i  "1s/^.*$/$LINE/"  /etc/hosts;
mkdir /home/webscan/logs/$a;
wget www.xxx.com -O /home/webscan/logs/$a/$LINE.html;
done < /home/webscan/hosts


b=`grep 'xxxxx' /home/webscan/logs/$a/*|wc -l`;
echo $b;

if [ "$b" != "16" ]
then
    echo 'hello!' | mailx -s "test" [email protected];
fi


猜你喜欢

转载自to8to-bruce.iteye.com/blog/2218715