Advertisement
IagoCardoso98

Untitled

Dec 7th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••; tput sgr0
  4. tput setaf 7 ; tput setab 4 ; tput bold ; printf '%5s%s%-20s\n' " • Configuração de Banner SSHHD • " ; tput sgr0
  5.  
  6. tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••; tput sgr0
  7.  
  8. tput setaf 2 ; tput bold ; printf '%0s%s%-1s\n' " Deseja iniciar a configuração Banner SSHHD ?" ; tput sgr0
  9.  
  10.  
  11. tput setaf 3 ; tput bold ; printf '%0s%s%-1s\n'
  12. echo "• [sim] para continuar
  13. • [nao] para sair do comando
  14. • [nome] para saber o nome do criador do script." ; tput sgr0; read utilitario
  15.  
  16. if [ "$utilitario" = "sim" ]
  17. then
  18. tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' "••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" ; tput sgr0
  19. tput setaf 2 ; tput bold ; echo "" ; echo " qual mensagem você deseja exibir ?" ; echo "" ; tput sgr0 ;
  20. read mensagem
  21. cd /etc/ssh*
  22. rm -v /etc/ssh/banner.txt 1>/dev/null 2> /dev/null
  23. echo "$mensagem" >> banner.txt
  24. echo "Banner /etc/ssh/banner.txt" >> sshd_config
  25.  
  26. tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' "••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" ; tput sgr0
  27. sleep 1
  28. tput setaf 2 ; tput setab 0 ; echo Iniciando reinicialização do SSHHD ; tput sgr0
  29. wget -O /bin/reloadsquid https://www.dropbox.com/s/feibr5varmkaxng/reload%20squid.txt?dl=0 1> /dthfiull 2> /dev/null
  30. dos2unix /bin/reloadsquid 1>/dev/null 2> /dev/null
  31. chmod +x /bin/reloadsquid 1>/dev/null 2> /dev/null
  32.  
  33. "reloadsquid"
  34.  
  35. tput setaf 2 ; tput setab 0 ; echo " Mensagem banner configurada com sucesso, caso queira editar a mensagem digite banner.sh" ; tput sgr0
  36. exit
  37. fi
  38.  
  39.  
  40. if [ "$utilitario" = "nao" ]
  41. then
  42. exit 0
  43. fi
  44.  
  45.  
  46. if [ "$utilitario" = "nome" ]
  47. clear
  48. then
  49. apt-get install figlet 1> /dev/null 2> /dev/null
  50. figlet Iago Cardoso
  51. sleep 1
  52. "banner.sh"
  53.  
  54. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement