Compare commits
2 Commits
73c88559ed
...
cf462bf279
Author | SHA1 | Date | |
---|---|---|---|
|
cf462bf279 | ||
|
3666dc2ca1 |
35
firewall.sh
35
firewall.sh
@ -307,40 +307,6 @@ forgive() {
|
||||
rateLimit $HTTP_LIMIT
|
||||
}
|
||||
|
||||
module-akkoma-timeline-public() {
|
||||
ATTACK="module-akkoma-timeline-public DDOS Attack "
|
||||
SEARCH_SPAM=$(grep $2 $ACCESS | grep "timelines/public" | grep $1 | wc -l)
|
||||
CHECK=$(cat $NFT_CACHE | sort -u | grep $1)
|
||||
if [[ "$SEARCH_SPAM" -gt 30 ]]; then
|
||||
echo "$IP $CHECK $COUNT"
|
||||
if [ "$CHECK" = "" ]; then
|
||||
ipBlockParser "$1"
|
||||
redis-cli SADD tmp_block $1
|
||||
message "$ATTACK $1"
|
||||
echo "$ATTACK $1"
|
||||
else
|
||||
echo "$ATTACK Ignoring Duplicate IP: $1"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
module-akkoma-timeline-home() {
|
||||
ATTACK="module-akkoma-timeline-home DDOS Attack "
|
||||
SEARCH_SPAM=$(grep $2 $ACCESS | grep -E "timelines/home" | grep $1 | wc -l)
|
||||
CHECK=$(cat $NFT_CACHE | sort -u | grep $1)
|
||||
if [[ "$SEARCH_SPAM" -gt 30 ]]; then
|
||||
echo "$IP $CHECK $COUNT"
|
||||
if [ "$CHECK" = "" ]; then
|
||||
ipBlockParser "$1"
|
||||
redis-cli SADD tmp_block $1
|
||||
message "$ATTACK $1"
|
||||
echo "$ATTACK $1"
|
||||
else
|
||||
echo "$ATTACK Ignoring Duplicate IP: $1"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
module-get-spam() {
|
||||
ATTACK="module-get-spam DDOS Attack "
|
||||
GET_SPAM=$(grep $2 $ACCESS | grep -E "GET / HTTP" | wc -l)
|
||||
@ -368,6 +334,7 @@ watch() {
|
||||
|
||||
for i in "${IP[@]}"; do
|
||||
bash $MODULES/module-akkoma-instance.sh "$i" "$DATE"
|
||||
module-akkoma-timeline-home "$i" "$DATE"
|
||||
module-akkoma-timeline-public "$i" "$DATE"
|
||||
module-akkoma-timeline-home "$i" "$DATE"
|
||||
bash $MODULES/module-akkoma-accounts.sh "$i" "$DATE"
|
||||
|
Loading…
Reference in New Issue
Block a user