This commit is contained in:
Your Name 2024-09-24 21:18:59 -06:00
parent 13864fc39f
commit 95a4eebe1a
2 changed files with 20 additions and 0 deletions

10
modules/module-go.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
FIREWALL="/opt/firewall/firewall.sh"
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 message "$ATTACK $1"
fi

10
modules/module-php.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
FIREWALL="/opt/firewall/firewall.sh"
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 message "$ATTACK $1"
fi