2024-06-26 15:43:16 -05:00

350 lines
6.2 KiB
Bash

#!/bin/bash
E='echo -e'
e='echo -en'
trap "R; exit" 2
ESC=$( $e "\e")
TPUT() {
$e "\e[${1};${2}H"
}
CLEAR() {
$e "\ec"
}
CIVIS() {
$e "\e[?25l"
}
MARK() {
$e "\e[7m"
}
UNMARK() {
$e "\e[27m"
}
R() {
CLEAR
stty
sane
CLEAR
}
HEAD() {
for each in $(seq 1 30)
do
$E " \xE2\x94\x82 \xE2\x94\x82"
done
MARK
TPUT 1 10
$E " UFW BlockList Install "
UNMARK
TPUT 2 10
$E " Select a Bloclist from the List "
UNMARK
}
i=0
CLEAR
CIVIS
NULL=/dev/null
FOOT() {
MARK
TPUT 15 5
$E " UP \xE2\x86\x91 \xE2\x86\x93 DOWN ENTER - SELECT,NEXT "
UNMARK
}
ARROW() {
IFS= read -sr -n1 key 2>/dev/null >&2
if [[ $key = "$ESC" ]]; then
read -sr -n1 key 2>/dev/null >&2
if [[ $key = \[ ]]; then
read -sr -n1 key 2>/dev/null >&2
if [[ $key = A ]]; then
echo up
fi
if [[ $key = B ]]; then
echo dn
fi
fi
fi
if [[ "$key" == "$($e \\x0A)" ]]; then
echo enter
fi
}
M0() {
TPUT 4 20
$e "Binary Defense Systems Artillery Threat Intelligence Banlist"
}
M1() {
TPUT 5 20
$e "Blocklist.de Fail2Ban Reporting (all)"
}
M2() {
TPUT 6 20
$e "BruteForceBlocker"
}
M3() {
TPUT 7 20
$e "CINS Army List"
}
M4() {
TPUT 8 20
$e "FEODO Tracker: Botnet C2"
}
M5() {
TPUT 9 20
$e "FEODO Tracker: Botnet C2 IoC"
}
M6() {
TPUT 10 20
$e "FireHOL IP List Level 1"
}
M7() {
TPUT 11 20
$e "GreenSnow"
}
M8() {
TPUT 12 20
$e "IPsum - (Recommended)"
}
M9() {
TPUT 12 20
$e "Spamhaus Don't Route Or Peer List (DROP)"
}
M10() {
TPUT 13 20
$e "Spamhaus Extended DROP List (EDROP)"
}
M11() {
TPUT 14 20
$e "MaxMind"
}
M12() {
TPUT 15 20
$e "Main Menu"
}
M13() {
TPUT 16 20
$e "EXIT "
}
LM=8
MENU() {
for each in $(seq 0 $LM)
do
M"${each}"
done
}
POS() {
if [[ $cur == up ]]; then
((i--))
fi
if [[ $cur == dn ]]; then
((i++))
fi
if [[ $i -lt 0 ]]; then
i=$LM
fi
if [[ $i -gt $LM ]]; then
i=0
fi
}
REFRESH() {
after=$((i+1))
before=$((i-1))
if [[ $before -lt 0 ]]; then
before=$LM
fi
if [[ $after -gt $LM ]]; then
after=0
fi
if [[ $j -lt $i ]]; then
UNMARK
M$before
else
UNMARK
M$after
fi
if [[ $after -eq 0 ]] || [ $before -eq $LM ]; then
UNMARK
M$before
M$after
fi
j=$i
UNMARK
M$before
M$after
}
INIT() {
R
HEAD
FOOT
MENU
}
SC() {
REFRESH
MARK
$S
$b
cur=$(ARROW)
}
ES() {
MARK
$e "ENTER = Main Menu "
$b
read -r
INIT
}
INIT
while [[ "$O" != " " ]];
do
case $i in
0) S=M0
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e Binary Defense Systems Artillery Threat Intelligence Banlist)\n"
ES
fi
;;
1) S=M1
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e Blocklist.de Fail2Ban Reporting - all)\n"
ES
fi
;;
2) S=M2
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e BruteForceBlocker)\n"
ES
fi
;;
3) S=M3
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e CINS Army List)\n"
ES
fi
;;
4) S=M4
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e FEODO Tracker: Botnet C2)\n"
ES
fi
;;
5) S=M5
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e FEODO Tracker: Botnet C2 IoC)\n"
ES
fi
;;
6) S=M6
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e FireHOL IP List Level 1)\n"
ES
fi
;;
7) S=M7
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e GreenSnow)\n"
ES
fi
;;
8) S=M8
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e IPsum - \(Recommended\))\n"
ES
fi
;;
9) S=M9
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e Spamhaus Don\'t Route Or Peer List \(DROP))\n"
ES
fi
;;
10) S=M10
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e Spamhaus Extended DROP List \(EDROP))\n"
ES
fi
;;
11) S=M11
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e MaxMind)\n"
ES
fi
;;
12) S=M12
SC
if [[ $cur == enter ]]; then
R
$e "\n$($e Main Menu)\n"
ES
fi
;;
13) S=M13
SC
if [[ $cur == enter ]]; then
R
exit 0
fi
;;
esac
POS
done