Fixed misspelling and blocklist menu loop
This commit is contained in:
parent
6cee4da2c1
commit
ba7fa334ed
@ -1,116 +1,140 @@
|
||||
#! /bin/bash
|
||||
function bdsatib() {
|
||||
{
|
||||
ufw-blocklist -l "bdsatib https://www.binarydefense.com/banlist.txt"
|
||||
ufw-blocklists.sh -l "bdsatib https://www.binarydefense.com/banlist.txt"
|
||||
if ! crontab -l | grep -q "bdsatib"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "bdsatib https://www.binarydefense.com/banlist.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function f2ball() {
|
||||
{
|
||||
ufw-blocklist -l "f2ball https://lists.blocklist.de/lists/all.txt"
|
||||
ufw-blocklists.sh -l "f2ball https://lists.blocklist.de/lists/all.txt"
|
||||
if ! crontab -l | grep -q "f2ball"; then
|
||||
echo -e "$(crontab -u root -l)\n*/35 * * * * /usr/local/bin/ufw-blocklists.sh -l "f2ball https://lists.blocklist.de/lists/all.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function bfblocker() {
|
||||
{
|
||||
ufw-blocklist -l "bfblocker https://danger.rulez.sk/projects/bruteforceblocker/blist.php"
|
||||
ufw-blocklists.sh -l "bfblocker https://danger.rulez.sk/projects/bruteforceblocker/blist.php"
|
||||
if ! crontab -l | grep -q "bfblocker"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "bfblocker https://danger.rulez.sk/projects/bruteforceblocker/blist.php"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function cinsarmy() {
|
||||
{
|
||||
ufw-blocklist -l "cinsarmy http://cinsscore.com/list/ci-badguys.txt"
|
||||
ufw-blocklists.sh -l "cinsarmy http://cinsscore.com/list/ci-badguys.txt"
|
||||
if ! crontab -l | grep -q "cinsarmy"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "cinsarmy http://cinsscore.com/list/ci-badguys.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function drop() {
|
||||
{
|
||||
if grep -q -E "IPV6=(yes|YES)" /etc/default/ufw; then
|
||||
ufw-blocklist -l "drop https://www.spamhaus.org/drop/drop.txt" -l "dropv6 https://www.spamhaus.org/drop/dropv6.txt"
|
||||
ufw-blocklists.sh -l "drop https://www.spamhaus.org/drop/drop.txt" -l "dropv6 https://www.spamhaus.org/drop/dropv6.txt"
|
||||
if ! crontab -l | grep -q "dropv6"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "drop https://www.spamhaus.org/drop/drop.txt" -l "dropv6 https://www.spamhaus.org/drop/dropv6.txt"" | crontab -u root -
|
||||
fi
|
||||
else
|
||||
ufw-blocklist -l "drop https://www.spamhaus.org/drop/drop.txt"
|
||||
ufw-blocklists.sh -l "drop https://www.spamhaus.org/drop/drop.txt"
|
||||
if ! crontab -l | grep -q "drop"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "drop https://www.spamhaus.org/drop/drop.txt"" | crontab -u root -
|
||||
fi
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function edrop() {
|
||||
{
|
||||
ufw-blocklist -l "edrop https://www.spamhaus.org/drop/edrop.txt"
|
||||
ufw-blocklists.sh -l "edrop https://www.spamhaus.org/drop/edrop.txt"
|
||||
if ! crontab -l | grep -q "edrop"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "edrop https://www.spamhaus.org/drop/edrop.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function feodoc2() {
|
||||
{
|
||||
ufw-blocklist -l "feodoc2 https://feodotracker.abuse.ch/downloads/ipblocklist_recommended.txt"
|
||||
ufw-blocklists.sh -l "feodoc2 https://feodotracker.abuse.ch/downloads/ipblocklist_recommended.txt"
|
||||
if ! crontab -l | grep -q "feodoc2"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "feodoc2 https://feodotracker.abuse.ch/downloads/ipblocklist_recommended.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function feodoioc() {
|
||||
{
|
||||
ufw-blocklist -l "feodoioc https://feodotracker.abuse.ch/downloads/ipblocklist.txt"
|
||||
ufw-blocklists.sh -l "feodoioc https://feodotracker.abuse.ch/downloads/ipblocklist.txt"
|
||||
if ! crontab -l | grep -q "fedoioc"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "feodoioc https://feodotracker.abuse.ch/downloads/ipblocklist.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function firehol() {
|
||||
{
|
||||
ufw-blocklist -l "firehol https://iplists.firehol.org/files/firehol_level1.netset"
|
||||
ufw-blocklists.sh -l "firehol https://iplists.firehol.org/files/firehol_level1.netset"
|
||||
if ! crontab -l | grep -q "firehol"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "firehol https://iplists.firehol.org/files/firehol_level1.netset"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function greensnow() {
|
||||
{
|
||||
ufw-blocklist -l "greensnow https://blocklist.greensnow.co/greensnow.txt"
|
||||
ufw-blocklists.sh -l "greensnow https://blocklist.greensnow.co/greensnow.txt"
|
||||
if ! crontab -l | grep -q "bdsatib"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "greensnow https://blocklist.greensnow.co/greensnow.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function ipsum() {
|
||||
{
|
||||
ufw-blocklist -l "ipsum https://raw.githubusercontent.com/stamparm/ipsum/master/levels/2.txt"
|
||||
ufw-blocklists.sh -l "ipsum https://raw.githubusercontent.com/stamparm/ipsum/master/levels/2.txt"
|
||||
if ! crontab -l | grep -q "ipsum"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "ipsum https://raw.githubusercontent.com/stamparm/ipsum/master/levels/2.txt"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
function maxmind(){
|
||||
{
|
||||
ufw-blocklist -l "maxmind https://www.maxmind.com/en/anonymous_proxies"
|
||||
ufw-blocklists.sh -l "maxmind https://www.maxmind.com/en/anonymous_proxies"
|
||||
if ! crontab -l | grep -q "maxmind"; then
|
||||
echo -e "$(crontab -u root -l)\n@daily /usr/local/bin/ufw-blocklists.sh -l "maxmind https://www.maxmind.com/en/anonymous_proxies"" | crontab -u root -
|
||||
fi
|
||||
|
||||
blocklist_menu
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,40 +161,28 @@ function blocklist_menu() {
|
||||
read -rn 1 user_input
|
||||
if [[ "$user_input" == '1' ]]; then
|
||||
bdsatib
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '2' ]]; then
|
||||
f2ball
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '3' ]]; then
|
||||
bfblocker
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '4' ]]; then
|
||||
cins
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '5' ]]; then
|
||||
feodoc2
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '6' ]]; then
|
||||
feodoioc
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '7' ]]; then
|
||||
firehol
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '8' ]]; then
|
||||
maxmind
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '9' ]]; then
|
||||
greensnow
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '10' ]]; then
|
||||
ipsum
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '11' ]]; then
|
||||
drop
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == '12' ]]; then
|
||||
edrop
|
||||
blocklist_menu
|
||||
elif [[ "$user_input" == xX ]]; then
|
||||
exit 0
|
||||
elif [[ "$user_input" == bB ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user