This commit is contained in:
Your Name 2024-09-24 21:21:45 -06:00
parent 95a4eebe1a
commit 3725d7e503
3 changed files with 14 additions and 4 deletions

View File

@ -4,7 +4,7 @@ ACCESS="/tmp/minute.log"
ATTACK="module-go DDOS Attack "
GO_SPAM=$(grep $2 $ACCESS | grep -E "Go-http-client" | wc -l)
if [[ "$GO_SPAM" -gt 10 ]]; then
./firewall.sh ipBlockParser "$1"
redis-cli SADD tmp_block $1
bash $FIREWALL ipBlockParser "$1"
bash $FIREWALL message "$ATTACK $1"
redis-cli SADD tmp_block $1
fi

View File

@ -0,0 +1,10 @@
#!/bin/bash
FIREWALL="/opt/firewall/firewall.sh"
ACCESS="/tmp/minute.log"
ATTACK="module-lightning DDOS Attack "
LN_SPAM=$(grep $2 $ACCESS | grep "lnurlp/verita84" | wc -l)
if [[ "$LN_SPAM" -gt 5 ]]; then
bash $FIREWALLipBlockParser "$1"
bash $FIREWALL message "$ATTACK $1"
redis-cli SADD tmp_block $1
fi

View File

@ -4,7 +4,7 @@ ACCESS="/tmp/minute.log"
ATTACK="module-php DDOS 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
./firewall.sh ipBlockParser "$1"
redis-cli SADD tmp_block $1
bash $FIREWALL ipBlockParser "$1"
bash $FIREWALL message "$ATTACK $1"
redis-cli SADD tmp_block $1
fi