check for literal . when checking IP against cache

This commit is contained in:
sceox 2020-11-18 16:18:52 -08:00
parent a6fdf3921e
commit 17751c93f3

View File

@ -8,7 +8,8 @@ test -f $cache || install -m 600 /dev/null $cache
tail -F $logf | while read line ; do
case $line in (*"POST"*)
ip=`echo $line | awk '{print $1}'`
if ! grep -q $ip $cache; then
ip_regex=`echo $ip | sed 's/\./\\./g'`
if ! grep -q $ip_regex $cache; then
echo $ip >> $cache
/usr/local/bin/forumspam.sh "$ip"
fi