fix
This commit is contained in:
parent
13864fc39f
commit
95a4eebe1a
10
modules/module-go.sh
Normal file
10
modules/module-go.sh
Normal 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
10
modules/module-php.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user