Merge branch 'main' of https://git.poster.place/verita84/firewall
This commit is contained in:
commit
f901a34bad
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
|
||||
bash $FIREWALL ipBlockParser "$1"
|
||||
bash $FIREWALL message "$ATTACK $1"
|
||||
redis-cli SADD tmp_block $1
|
||||
fi
|
10
modules/module-lightning.sh
Normal file
10
modules/module-lightning.sh
Normal 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
|
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
|
||||
bash $FIREWALL ipBlockParser "$1"
|
||||
bash $FIREWALL message "$ATTACK $1"
|
||||
redis-cli SADD tmp_block $1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user