监控WED站点被恶意篡改
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了监控WED站点被恶意篡改相关的知识,希望对你有一定的参考价值。
[[email protected] web_seripts]# cat md5sum.sh #!/bin/sh #-------------------------------------------- #Author: Created by zhangyiling 2016-09 #Function: This scripts function is "Monitoring Web Site" #Version:4.1.2 #--------------------------------------------- LANG=en MD5_PATH=/server/scripts/web_scripts CAT_LOG=`cat $MD5_PATH/check_site.log` [ ! -f "$CAT_LOG" ] && touch $MD5_PATH/check_site.log while true do F=`md5sum -c $MD5_PATH/md5sum.db 2>/dev/null|grep FAILED|wc -l` find /application/nginx/html/bbs -type f >$MD5_PATH/new_site.log TMP_LOG=/tmp/check.log [ ! -f $TMP_LOG ] && touch $TMP_LOG if [ $F -ne 0 ] || [ `cat $MD5_PATH/new_site.log|wc -l` -ne `cat $CAT_LOG|wc -l` ];then echo "`md5sum -c md5sum.db 2>/dev/null|grep FAILED`" >$TMP_LOG diff $MD5_PATH/check_site.log $MD5_PATH/new_site.log >>$TMP_LOG 2>&1 mail -s "site is cuangai $(date)" [email protected] <$TMP_LOG fi sleep 180 done #也可写入定时任务:*/3 * * * * /bin/sh /server/scripts/web_scripts/md5sum.sh >/dev/null 2>&1
本文出自 “randolph” 博客,转载请与作者联系!
以上是关于监控WED站点被恶意篡改的主要内容,如果未能解决你的问题,请参考以下文章