trial-ssh.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. red='\e[1;31m'
  3. green='\e[0;32m'
  4. NC='\e[0m'
  5. MYIP=$(wget -qO- https://icanhazip.com);
  6. echo "Checking VPS"
  7. clear
  8. IP=$(wget -qO- https://icanhazip.com);
  9. if [[ "$domain" = "" ]]; then
  10. domain=$(cat /home/domain)
  11. else
  12. domain=$IP
  13. fi
  14. ssl="$(cat ~/log-install.txt | grep -w "Stunnel4" | cut -d: -f2)"
  15. sqd="$(cat ~/log-install.txt | grep -w "Squid" | cut -d: -f2)"
  16. ovpn="$(netstat -nlpt | grep -i openvpn | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
  17. ovpn2="$(netstat -nlpu | grep -i openvpn | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
  18. Login=trial`</dev/urandom tr -dc X-Z0-9 | head -c4`
  19. hari="1"
  20. Pass=1
  21. echo Ping Host
  22. echo Cek Hak Akses...
  23. sleep 0.5
  24. echo Permission Accepted
  25. clear
  26. sleep 0.5
  27. echo Membuat Akun: $Login
  28. sleep 0.5
  29. echo Setting Password: $Pass
  30. sleep 0.5
  31. clear
  32. useradd -e `date -d "$masaaktif days" +"%Y-%m-%d"` -s /bin/false -M $Login
  33. exp="$(chage -l $Login | grep "Account expires" | awk -F": " '{print $2}')"
  34. echo -e "$Pass\n$Pass\n"|passwd $Login &> /dev/null
  35. echo -e ""
  36. echo -e "==============================="
  37. echo -e "Information Trial SSH & OpenVPN"
  38. echo -e "==============================="
  39. echo -e "Domain : $domain"
  40. echo -e "Host : $IP"
  41. echo -e "Username : $Login "
  42. echo -e "Password : $Pass"
  43. echo -e "==============================="
  44. echo -e "OpenSSH : 22"
  45. echo -e "Dropbear : 109, 143"
  46. echo -e "SSL/TLS :$ssl"
  47. echo -e "Port Squid :$sqd"
  48. echo -e "OpenVPN : TCP $ovpn http://$IP:81/client-tcp-$ovpn.ovpn"
  49. echo -e "OpenVPN : UDP $ovpn2 http://$IP:81/client-udp-$ovpn2.ovpn"
  50. echo -e "OpenVPN : SSL 442 http://$IP:81/client-tcp-ssl.ovpn"
  51. echo -e "badvpn : 7100-7300"
  52. echo -e "==============================="
  53. echo -e "Expired On : $exp"
  54. echo -e "Script By EvoTeamMalaysia"
  55. echo -e ""