fix
This commit is contained in:
parent
e4a4c4dd8a
commit
9784681f9b
64
firewall.sh
64
firewall.sh
@ -341,7 +341,7 @@ message() {
|
||||
|
||||
test-bots() {
|
||||
for i in "${SAVED_BOTS[@]}"; do
|
||||
DATA=$(grep $i $ACCESS | grep -Fivf <(printf '%s\n' "${CRAWLER_DB[@]}"))
|
||||
DATA=$(grep $i $NGINX_ACCESS | grep -Fivf <(printf '%s\n' "${CRAWLER_DB[@]}"))
|
||||
if [ "$DATA" = "" ]; then
|
||||
echo "No Data. Probably OK"
|
||||
else
|
||||
@ -360,62 +360,6 @@ research-ip() {
|
||||
read -p 'Press Enter to Continue ' -e
|
||||
}
|
||||
|
||||
menu() {
|
||||
clear
|
||||
echo
|
||||
echo $MENU_TOP
|
||||
echo "1. Start"
|
||||
echo "2. Stop"
|
||||
echo "3. Reseearch"
|
||||
echo "4. Forgive"
|
||||
echo "5. Status"
|
||||
echo "6. Live Traffic"
|
||||
echo "7. Test Bot Search Rules"
|
||||
echo "8. Research IP"
|
||||
echo "9. View Current Rule Set"
|
||||
echo "0. Quit"
|
||||
echo $MENU_BOTTOM
|
||||
echo
|
||||
read -p 'Choice: ' CHOICE
|
||||
echo
|
||||
if [ "$CHOICE" = "1" ]; then
|
||||
echo
|
||||
echo "Starting Firewall"
|
||||
start
|
||||
read -p 'Press Enter to Continue ' -e-
|
||||
elif [ "$CHOICE" = "2" ]; then
|
||||
echo
|
||||
echo "Stopping Firewall"
|
||||
stop
|
||||
read -p 'Press Enter to Continue ' -e
|
||||
elif [ "$CHOICE" = "3" ]; then
|
||||
research
|
||||
read -p 'Press Enter to Continue ' -e
|
||||
elif [ "$CHOICE" = "4" ]; then
|
||||
forgive
|
||||
elif [ "$CHOICE" = "55" ]; then
|
||||
automaticStatus
|
||||
elif [ "$CHOICE" = "5" ]; then
|
||||
status
|
||||
read -p 'Press Enter to Continue ' -e
|
||||
elif [ "$CHOICE" = "6" ]; then
|
||||
tail -f $ACCESS | grep -Fivf <(printf '%s\n' "${SAFE_TRAFFIC[@]}") | grep -Fivf <(printf '%s\n' "${CRAWLER_DB[@]}")
|
||||
read -p 'Press Enter to Continue ' -e
|
||||
elif [ "$CHOICE" = "7" ]; then
|
||||
test-bots
|
||||
read -p 'Press Enter to Continue ' -e
|
||||
elif [ "$CHOICE" = "8" ]; then
|
||||
research-ip
|
||||
read -p 'Press Enter to Continue ' -e
|
||||
elif [ "$CHOICE" = "9" ]; then
|
||||
nft -s list ruleset | less
|
||||
elif [ "$CHOICE" = "0" ]; then
|
||||
exit
|
||||
fi
|
||||
echo
|
||||
menu
|
||||
}
|
||||
|
||||
importDB() {
|
||||
DATA=($(cat safe.txt))
|
||||
for i in "${DATA[@]}"; do redis-cli SADD safe_traffic $i; done
|
||||
@ -458,8 +402,10 @@ elif [ "$1" = "bot-search" ]; then
|
||||
bot-search
|
||||
elif [ "$1" = "attacker-protection" ]; then
|
||||
attacker-protection
|
||||
elif [ "$1" = "status" ]; then
|
||||
elif [ "$1" = "automatic-status" ]; then
|
||||
automaticStatus
|
||||
elif [ "$1" = "status" ]; then
|
||||
status
|
||||
elif [ "$1" = "forgive" ]; then
|
||||
forgive
|
||||
elif [ "$1" = "watch" ]; then
|
||||
@ -477,5 +423,5 @@ elif [ "$1" = "ipBlockParser" ]; then
|
||||
elif [ "$1" = "import" ]; then
|
||||
import-saved
|
||||
else
|
||||
menu
|
||||
bash $MODULES/module-menu.sh
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user