fix
This commit is contained in:
parent
1aad32eb95
commit
701fab5b6c
@ -313,15 +313,6 @@ watch() {
|
||||
IP=($(grep $DATE $ACCESS | grep -Fivf <(printf '%s\n' "${SAFE_TRAFFIC[@]}") | grep -Fivf <(printf '%s\n' "${CRAWLER_DB[@]}") | grep -Fivf <(printf '%s\n' "${SAVED_BOTS[@]}") | grep -vi $MY_IP | grep -vi '127.0.0.1' | cut -d ' ' -f1 | sort -u))
|
||||
|
||||
for i in "${IP[@]}"; do
|
||||
bash $MODULES/module-akkoma-instance.sh "$i" "$DATE"
|
||||
bash $MODULES/module-akkoma-timeline-public.sh "$i" "$DATE"
|
||||
bash $MODULES/module-akkoma-timeline-home.sh "$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"
|
||||
bash $MODULES/module-go.sh "$i" "$DATE"
|
||||
bash $MODULES/module-get-spam.sh "$i" "$DATE"
|
||||
|
||||
COUNT=$(grep $DATE $ACCESS | grep $i | grep -Fivf <(printf '%s\n' "${SAFE_TRAFFIC[@]}") | grep -Fivf <(printf '%s\n' "${SAVED_BOTS[@]}") | wc -l)
|
||||
CHECK=$(cat $NFT_CACHE | sort -u | grep $i)
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-akkoma-accounts DDOS Attack "
|
||||
echo $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
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-akkoma-instance DDOS Attack "
|
||||
echo $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
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-akkoma-search DDOS Attack "
|
||||
echo $ATTACK
|
||||
SEARCH_SPAM=$(grep $2 $ACCESS | grep "api/v2/search" | grep $1 | wc -l)
|
||||
CHECK=$(cat $NFT_CACHE | sort -u | grep $1)
|
||||
if [[ "$SEARCH_SPAM" -gt 10 ]]; then
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-akkoma-timeline-home DDOS Attack "
|
||||
echo $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
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-akkoma-timeline-public DDOS Attack "
|
||||
echo $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
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-get-spam DDOS Attack "
|
||||
echo $ATTACK
|
||||
GET_SPAM=$(grep $2 $ACCESS | grep -E "GET / HTTP" | wc -l)
|
||||
if [[ "$GET_SPAM" -gt 20 ]]; then
|
||||
bash $FIREWALL ipBlockParser "$1"
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-go DDOS Attack "
|
||||
echo $ATTACK
|
||||
GO_SPAM=$(grep $2 $ACCESS | grep -E "Go-http-client" | wc -l)
|
||||
if [[ "$GO_SPAM" -gt 10 ]]; then
|
||||
bash $FIREWALL ipBlockParser "$1"
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-lightning DDOS Attack "
|
||||
echo $ATTACK
|
||||
LN_SPAM=$(grep $2 $ACCESS | grep "lnurlp/verita84" | wc -l)
|
||||
if [[ "$LN_SPAM" -gt 5 ]]; then
|
||||
bash $FIREWALLipBlockParser "$1"
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
IP=($(grep $DATE $ACCESS | grep "/block=" | cut -d '=' -f2 | cut -d ' ' -f1 | sed 's/"//'))
|
||||
echo "module-nostr"
|
||||
IP=($(grep $2 $ACCESS | grep "/block=" | cut -d '=' -f2 | cut -d ' ' -f1 | sed 's/"//'))
|
||||
for i in "${IP[@]}"; do
|
||||
echo $i
|
||||
if [[ "$i" == *"npub"* ]]; then
|
||||
bash /opt/strfry-policies/block.sh $i
|
||||
else
|
||||
|
@ -2,6 +2,7 @@
|
||||
FIREWALL="/opt/firewall/firewall.sh"
|
||||
ACCESS="/tmp/minute.log"
|
||||
ATTACK="module-php DDOS Attack "
|
||||
echo $ATTACK
|
||||
PHP_SPAM=$(grep $2 $ACCESS | grep -E ".php|cgi-bin|wp-content|wp-admin|wp-includes" | wc -l)
|
||||
if [[ "$PHP_SPAM" -gt 10 ]]; then
|
||||
bash $FIREWALL ipBlockParser "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user