This commit is contained in:
Your Name 2024-09-25 03:25:07 +00:00
parent f901a34bad
commit 8bff904957

View File

@ -307,40 +307,6 @@ forgive() {
rateLimit $HTTP_LIMIT
}
module-akkoma-accounts() {
ATTACK="module-akkoma-accounts DDOS Attack "
SEARCH_SPAM=$(grep $2 $ACCESS | grep "api/v1/accounts" | 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-instance() {
ATTACK="module-akkoma-instance DDOS Attack "
SEARCH_SPAM=$(grep $2 $ACCESS | grep -E "api/v1/instance" | 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-public() {
ATTACK="module-akkoma-timeline-public DDOS Attack "
SEARCH_SPAM=$(grep $2 $ACCESS | grep "timelines/public" | grep $1 | wc -l)
@ -404,7 +370,7 @@ watch() {
module-akkoma-instance "$i" "$DATE"
module-akkoma-timeline-public "$i" "$DATE"
module-akkoma-timeline-home "$i" "$DATE"
module-akkoma-accounts "$i" "$DATE"
bash $MODULES/module-akkoma-accounts.sh "$i" "$DATE"
bash $MODULES/module-akkoma-search.sh "$i" "$DATE"
bash $MODULES/module-lightning.sh "$i" "$DATE"
bash $MODULES/module-php.sh "$i" "$DATE"