check for literal .
when checking IP against cache
This commit is contained in:
parent
a6fdf3921e
commit
17751c93f3
@ -8,7 +8,8 @@ test -f $cache || install -m 600 /dev/null $cache
|
|||||||
tail -F $logf | while read line ; do
|
tail -F $logf | while read line ; do
|
||||||
case $line in (*"POST"*)
|
case $line in (*"POST"*)
|
||||||
ip=`echo $line | awk '{print $1}'`
|
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
|
echo $ip >> $cache
|
||||||
/usr/local/bin/forumspam.sh "$ip"
|
/usr/local/bin/forumspam.sh "$ip"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user