slowdns 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. clear
  3. RED='\033[1;31m'
  4. GREEN='\033[1;32m'
  5. YELLOW='\033[1;37m'
  6. CORTITLE='\033[1;41m'
  7. SCOLOR='\033[0m'
  8. banner='
  9. ___ _ _____ _____ _ _ ___
  10. / __| | / _ \ \ / / \| \| / __|
  11. \__ \ |_| (_) \ \/\/ /| |) | . \__ \
  12. |___/____\___/ \_/\_/ |___/|_|\_|___/'
  13. echo -e "${CORTITLE}=====================================${SCOLOR}"
  14. echo -e "${CORTITLE} SSH CLIENTE SLOWDNS ${SCOLOR}"
  15. echo -e "${CORTITLE}=====================================${SCOLOR}"
  16. echo -e "${RED}$banner${SCOLOR}"
  17. [[ ! -e dns ]] && {
  18. yes| termux-setup-storage > /dev/null 2>&1
  19. unset LD_PRELOAD > /dev/null 2>&1
  20. cd $HOME
  21. mv slowdns $PREFIX/bin/slowdns
  22. chmod +x $PREFIX/bin/slowdns
  23. [[ $(grep -c 'slowdns' $PREFIX/etc/profile) == '0' ]] && echo 'slowdns' >> $PREFIX/etc/profile
  24. echo -e "\n${GREEN}BAIXANDO O SCRIPT POR FAVOR AGUARDE ! ${SCOLOR}"
  25. curl -O https://raw.githubusercontent.com/modderajuda/donomodderajuda/main/S/dns > /dev/null 2>&1
  26. echo -e "\n${RED}[${YELLOW}!${RED}] ${YELLOW}SCRIPT BAIXADO ! DA PROXIMA VEZ\nEXECULTE APENAS O COMANDO ${RED}(${GREEN}slowdns${RED})\n${YELLOW}MESMO QUE VOCÊ ESTEJA OFFLINE !${SCOLOR}"
  27. chmod +x dns
  28. }
  29. [[ ! -e $HOME/credenciais ]] && {
  30. ns=$1
  31. [[ -z "$ns" ]] && {
  32. echo -e "\n${RED}COMANDO IMCOMPLETO${SCOLOR}"
  33. exit 0
  34. }
  35. chave=$2
  36. [[ -z "$chave" ]] && {
  37. echo -e "\n${RED}COMANDO IMCOMPLETO${SCOLOR}"
  38. exit 0
  39. }
  40. echo -e "$ns\n$chave" > $HOME/credenciais
  41. } || {
  42. perg=$(echo "${SCOLOR}[s/n]: ")
  43. echo -e "\n${YELLOW}O SCRIPT JA ESTÁ CONFIGURADO COM UM\nSEEVIDOR E ESTA PRONTO PARA CONEXAO"
  44. read -p "$(echo -e "${GREEN}QUER CONTINUAR COM O MESMO?${SCOLOR} [s/n]: ")" -e -i s opc
  45. [[ "$opc" != @(s|sim|S|SIM) ]] && {
  46. rm $HOME/credenciais dns > /dev/null 2>&1
  47. rm $PREFIX/bin/slowdns > /dev/null 2>&1
  48. sed -i '/slowdns/d' $PREFIX/etc/profile > /dev/null 2>&1
  49. echo -e "\n${RED}SCRIPT REMOVIDO !${SCOLOR}"
  50. rm slowdns > /dev/null 2>&1
  51. exit 0
  52. } || {
  53. unset LD_PRELOAD > /dev/null 2>&1
  54. ns=$(sed -n 1p $HOME/credenciais)
  55. chave=$(sed -n 2p $HOME/credenciais)
  56. }
  57. }
  58. dns=$3
  59. [[ -z "$dns" ]] && {
  60. dns='187.50.250.115'
  61. }
  62. echo -ne "\n${RED}[${YELLOW}!${RED}] ${YELLOW}PARA CONTINUAR CERTIFIQUE-SE DE\nESTÁ APENAS COM OS ${RED}(${YELLOW}DADOS MOVEIS${RED})\n${YELLOW}ATIVADO ${GREEN}ENTER ${YELLOW}PARA CONTINUAR.. ${SCOLOR}"; read
  63. $HOME/dns -udp ${dns}:53 -pubkey ${chave} ${ns} 127.0.0.1:2222 > /dev/null 2>&1 &
  64. echo -e "\n${RED}[${GREEN}√${RED}]${SCOLOR} - ${GREEN}SLOWDNS INICIADO!${SCOLOR} - ${RED}[${GREEN}√${RED}]\n\n${RED}[${YELLOW}!${RED}] ${YELLOW}AGORA CONECTE-SE EM UM APP VPN\nOU CLICK EM ${GREEN}ENTER ${RED}PARA DESCONECTAR ${SCOLOR}"; read
  65. piddns=$(ps x| grep -w 'dns' | grep -v 'grep'| awk -F' ' {'print $1'})
  66. [[ ${piddns} != '' ]] && kill ${piddns} > /dev/null 2>&1