DarkProgrammer000

OpenVas

Jul 30th, 2021
769
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Execucao do programa
  4. execucao()
  5. {
  6.     clear
  7.     echo -e "\033[01;34m\n  ----- Execucao ----- \n\033[01;37m"
  8.    
  9.     # Comando
  10.     gvm-start
  11. }
  12.  
  13. # Desativar OpenVas
  14. desativar()
  15. {
  16.     echo -e "\033[01;35m\n  ----- Desativacao ----- \n\033[01;37m"
  17.     gvm-stop
  18. }
  19.  
  20. # Instalacao do programa
  21. instalacao()
  22. {
  23.     echo -e "\033[01;35m\n  ----- Instalacao ----- \n\033[01;37m"
  24.  
  25.     # Instalacao
  26.     apt-get install openvas -y
  27.     gvm-setup
  28. }
  29.  
  30. zerarSenha()
  31. {
  32.     sudo sudo -E -u _gvm -g _gvm gvmd --user=admin --new-password="admin"
  33. }
  34.  
  35. clear
  36. echo -e "\033[01;34m ---------------\033[01;37m"
  37. echo -e "\033[01;35m     OpenVas    \033[01;37m"
  38. echo -e "\033[01;34m ---------------\033[01;37m"
  39. echo ""
  40. echo -e "\033[01;33m [1] Executar   \033[01;37m"
  41. echo -e "\033[01;34m [2] Desativar  \033[01;37m"
  42. echo -e "\033[01;34m [3] Zerar senha \033[01;37m"
  43. echo -e "\033[01;35m [4] Instalar    \033[01;37m"
  44. echo ""
  45. echo -e -n "\033[01;36m - Opc: \033[01;37m"
  46. read opc
  47. clear
  48.  
  49. # Estrutura de escolha
  50. case $opc in
  51.  
  52. 1)  execucao;;
  53. 2)  desativar;;
  54. 3)  zerarSenha;;
  55. 4)  instalacao;;
  56. *)  ;;
  57.  
  58. esac
  59.  
  60.  
RAW Paste Data