„update_blocklist.sh“ ändern
This commit is contained in:
parent
9da31d7a71
commit
a9398b93eb
1 changed files with 4 additions and 6 deletions
|
@ -48,8 +48,6 @@ while read BLOCKED_IP
|
|||
do
|
||||
# Check if IP valid
|
||||
VALID_IPv4=$(echo "$BLOCKED_IP" | grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | wc -l)
|
||||
|
||||
echo "$BLOCKED_IP"
|
||||
|
||||
if [[ $VALID_IPv4 -eq 1 ]]; then
|
||||
# Convert IPv4 to IPv6 :)
|
||||
|
@ -61,15 +59,15 @@ echo "$BLOCKED_IP"
|
|||
countadded=$(( $countadded + 1 ))
|
||||
if [[ $LOGLEVEL -eq 2 ]]; then
|
||||
echo "IP added to Database! --> $BLOCKED_IP"
|
||||
# elif [[ $LOGLEVEL -eq 1 ]]; then
|
||||
# echo -n "."
|
||||
elif [[ $LOGLEVEL -eq 1 ]]; then
|
||||
echo -n "."
|
||||
fi
|
||||
else
|
||||
countskipped=$(( $countskipped + 1 ))
|
||||
if [[ $LOGLEVEL -eq 2 ]]; then
|
||||
echo "IP already in Database! --> $BLOCKED_IP"
|
||||
# elif [[ $LOGLEVEL -eq 1 ]]; then
|
||||
# echo -n "."
|
||||
elif [[ $LOGLEVEL -eq 1 ]]; then
|
||||
echo -n "."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue