Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••; tput sgr0
- tput setaf 7 ; tput setab 4 ; tput bold ; printf '%5s%s%-20s\n' " • Configuração de Banner SSHHD • " ; tput sgr0
- tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••; tput sgr0
- tput setaf 2 ; tput bold ; printf '%0s%s%-1s\n' " Deseja iniciar a configuração Banner SSHHD ?" ; tput sgr0
- tput setaf 3 ; tput bold ; printf '%0s%s%-1s\n'
- echo "• [sim] para continuar
- • [nao] para sair do comando
- • [nome] para saber o nome do criador do script." ; tput sgr0; read utilitario
- if [ "$utilitario" = "sim" ]
- then
- tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' "••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" ; tput sgr0
- tput setaf 2 ; tput bold ; echo "" ; echo " qual mensagem você deseja exibir ?" ; echo "" ; tput sgr0 ;
- read mensagem
- cd /etc/ssh*
- rm -v /etc/ssh/banner.txt 1>/dev/null 2> /dev/null
- echo "$mensagem" >> banner.txt
- echo "Banner /etc/ssh/banner.txt" >> sshd_config
- tput setaf 2 ; tput setab 0 ; tput bold ; printf '%0s%s%-1s\n' "••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" ; tput sgr0
- sleep 1
- tput setaf 2 ; tput setab 0 ; echo Iniciando reinicialização do SSHHD ; tput sgr0
- wget -O /bin/reloadsquid https://www.dropbox.com/s/feibr5varmkaxng/reload%20squid.txt?dl=0 1> /dthfiull 2> /dev/null
- dos2unix /bin/reloadsquid 1>/dev/null 2> /dev/null
- chmod +x /bin/reloadsquid 1>/dev/null 2> /dev/null
- "reloadsquid"
- tput setaf 2 ; tput setab 0 ; echo " Mensagem banner configurada com sucesso, caso queira editar a mensagem digite banner.sh" ; tput sgr0
- exit
- fi
- if [ "$utilitario" = "nao" ]
- then
- exit 0
- fi
- if [ "$utilitario" = "nome" ]
- clear
- then
- apt-get install figlet 1> /dev/null 2> /dev/null
- figlet Iago Cardoso
- sleep 1
- "banner.sh"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement