diff --git a/roles/deploy-web/files/blacklist.sh b/roles/deploy-web/files/blacklist.sh index 4321bd0..d1d5f46 100755 --- a/roles/deploy-web/files/blacklist.sh +++ b/roles/deploy-web/files/blacklist.sh @@ -52,6 +52,8 @@ do echo ${i} >> ${MAIL} curl http://ipinfo.io/${i} >> ${MAIL} echo "" >> ${MAIL} + tail -n 50 $log_access | grep ${i} | awk -F "|" '{ if($2 == "400" || $2 == "404") print $0}' >> ${MAIL} + echo "" >> ${MAIL} echo ${i} >> ${BLACKLIST} done echo "IP dejà blacklisté : " >> ${MAIL}