1 Star 0 Fork 4

superguest/security_check

forked from ppabc/security_check 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wwwroot.sh 667 Bytes
一键复制 编辑 原始数据 按行查看 历史
ppabc 提交于 2014-10-17 14:30 . security_check
#!/bin/bash
#30 6 * * * /usr/local/sbin/anti-hacking.sh > /dev/null 2>&1
check_path="/home/wwwroot"
hacking_log="/data/shell"
maillist="ppabc@qq.com"
time=`date +%Y/%d/%m/%H:%M:%S`
find ${check_path} -name "*.php" -type f -print0|xargs -0 egrep "(phpspy|c99sh|milw0rm|eval\(base64_decode|spider_bc)"|awk -F: '{print $1}'|sort|uniq > ${hacking_log}/hacking.log
status=$(grep php /data/shell/hacking.log > /dev/null 2>&1)
if [ $? -eq 0 ]; then
echo "Hacking stauts: ${status} time:$time" | mutt -s "Anti-Hacking wwwroot status check" -a "${hacking_log}/hacking.log" ${maillist} < "${hacking_log}/hacking.log"
exit 0
else
echo not exist
exit 1
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/superguest/security_check.git
git@gitee.com:superguest/security_check.git
superguest
security_check
security_check
master

搜索帮助