diff --git a/atualizar.sh b/atualizar.sh index afecc10..2971ed9 100644 --- a/atualizar.sh +++ b/atualizar.sh @@ -1,12 +1,12 @@ #!/bin/bash echo -e " -░█████╗░███╗░░██╗██████╗░██████╗░░█████╗░░██████╗ -██╔══██╗████╗░██║██╔══██╗██╔══██╗██╔══██╗██╔════╝ -███████║██╔██╗██║██║░░██║██║░░██║██║░░██║╚█████╗░ -██╔══██║██║╚████║██║░░██║██║░░██║██║░░██║░╚═══██╗ -██║░░██║██║░╚███║██████╔╝██████╔╝╚█████╔╝██████╔╝ -╚═╝░░╚═╝╚═╝░░╚══╝╚═════╝░╚═════╝░░╚════╝░╚═════╝░" +░█████╗░██╗██╗░░██╗██████╗░░░░██████╗░██╗░░░██╗███╗░░██╗ +██╔══██╗██║╚██╗██╔╝██╔══██╗░░░██╔══██╗██║░░░██║████╗░██║ +██║░░██║██║░╚███╔╝░██████╦╝░░░██████╔╝██║░░░██║██╔██╗██║ +██║░░██║██║░██╔██╗░██╔══██╗░░░██╔══██╗██║░░░██║██║╚████║ +╚█████╔╝██║██╔╝╚██╗██████╦╝██╗██║░░██║╚██████╔╝██║░╚███║ +░╚════╝░╚═╝╚═╝░░╚═╝╚═════╝░╚═╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝" echo "Today is " `date` diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..f944709 --- /dev/null +++ b/start.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +echo -e " +░█████╗░███╗░░██╗██████╗░██████╗░░█████╗░░██████╗ +██╔══██╗████╗░██║██╔══██╗██╔══██╗██╔══██╗██╔════╝ +███████║██╔██╗██║██║░░██║██║░░██║██║░░██║╚█████╗░ +██╔══██║██║╚████║██║░░██║██║░░██║██║░░██║░╚═══██╗ +██║░░██║██║░╚███║██████╔╝██████╔╝╚█████╔╝██████╔╝ +╚═╝░░╚═╝╚═╝░░╚══╝╚═════╝░╚═════╝░░╚════╝░╚═════╝░" + + +COUNTRY="af es" + + +for country in $COUNTRIES; do + url="https://www.ipdeny.com/ipblocks/data/countries/${country}.zone" + echo "Baixando lista de IPs para o país: $country" + + # Baixar o arquivo + curl -s -O "$url" + + # Criar ipset para o país, ignorar se já existir + ipset create "$country" hash:net -exist + + # Adicionar cada rede ao ipset + while read -r subnet; do + ipset add "$country" "$subnet" -exist + done < "${country}.zone" + + echo "Concluído para o país $country." +done