使用md5判断网站内容是否被篡改

该脚本比较简单,,判断网站根目录是否被篡改,如果被篡改把篡改的文件发送到管理员邮箱

#!/bin/bash#author:luodi date:2013/10/11#use md5 to check web site . /etc/init.d/functions#var settingWEBDIR=/var/www/html/web/KEY=md5key#to determine whether a file exists[ -e $WEBDIR ] || exit [ -f $KEY ] || find $WEBDIR -type f -exec md5sum >>$KEY {} \;md5sum -c $KEY –quiet >error.file 2>/dev/null if [ $? -gt 0 ]thenaction /bin/falsemail -s @qq.com <error.fileelseaction /bin/truefi年岁有加,并非垂老,理想丢弃,方堕暮年。

使用md5判断网站内容是否被篡改

相关文章:

你感兴趣的文章:

标签云: