information ip envoyé
This commit is contained in:
parent
c7ddbd20b6
commit
02028f3bf3
@ -46,9 +46,14 @@ do
|
||||
count=$(cat /tmp/blacklist_404 /tmp/blacklist_400 |grep -f ${BLACKLIST} -v |sort |uniq |wc -l)
|
||||
if [ ${count} -ne 0 ]; then
|
||||
echo "Nouvelle IP blacklisté" > ${MAIL}
|
||||
cat /tmp/blacklist_400 /tmp/blacklist_404 |grep -f ${BLACKLIST} -v |sort |uniq >> ${MAIL}
|
||||
list_ip=($(cat /tmp/blacklist_400 /tmp/blacklist_404 |grep -f ${BLACKLIST} -v |sort |uniq))
|
||||
for i in ${list_ip[@]}
|
||||
do
|
||||
echo ${i} >> ${MAIL}
|
||||
curl http://ipinfo.ip/${i} >> ${MAIL}
|
||||
echo ${i} >> ${BLACKLIST}
|
||||
done
|
||||
echo "IP dejà blacklisté : " >> ${MAIL}
|
||||
cat /tmp/blacklist_400 /tmp/blacklist_404 |grep -f ${BLACKLIST} -v |sort |uniq >> ${BLACKLIST}
|
||||
cat ${BLACKLIST} >> ${MAIL}
|
||||
cat ${MAIL} |mail -s "Blacklist IP ${i}" valczebackup@gmail.com
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user