trial.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. IP=$(wget -qO- ipinfo.io/ip);
  3. ssl="$(cat ~/log-install.txt | grep -w "Stunnel4" | cut -d: -f2)"
  4. sqd="$(cat ~/log-install.txt | grep -w "Squid" | cut -d: -f2)"
  5. ovpn="$(netstat -nlpt | grep -i openvpn | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
  6. ovpn2="$(netstat -nlpu | grep -i openvpn | grep -i 0.0.0.0 | awk '{print $4}' | cut -d: -f2)"
  7. Login=trial`</dev/urandom tr -dc X-Z0-9 | head -c4`
  8. hari="1"
  9. Pass=1
  10. echo Ping Host
  11. echo Cek Hak Akses...
  12. sleep 0.5
  13. echo Permission Accepted
  14. clear
  15. sleep 0.5
  16. echo Membuat Akun: $Login
  17. sleep 0.5
  18. echo Setting Password: $Pass
  19. sleep 0.5
  20. clear
  21. useradd -e `date -d "$masaaktif days" +"%Y-%m-%d"` -s /bin/false -M $Login
  22. exp="$(chage -l $Login | grep "Account expires" | awk -F": " '{print $2}')"
  23. echo -e "$Pass\n$Pass\n"|passwd $Login &> /dev/null
  24. echo -e ""
  25. echo -e "Informasi Trial SSH & OpenVPN"
  26. echo -e "==============================="
  27. echo -e "Host : $IP"
  28. echo -e "OpenSSH : 22"
  29. echo -e "Dropbear : 109, 143"
  30. echo -e "SSL/TLS :$ssl"
  31. echo -e "Port Squid :$sqd"
  32. echo -e "OpenVPN : TCP $ovpn http://$IP:81/client-tcp-$ovpn.ovpn"
  33. echo -e "OpenVPN : UDP $ovpn2 http://$IP:81/client-udp-$ovpn2.ovpn"
  34. echo -e "OpenVPN : SSL 442 http://$IP:81/client-tcp-ssl.ovpn"
  35. echo -e "badvpn : 7100-7300"
  36. echo -e "==============================="
  37. echo -e "ACCOUNT TRIAL"
  38. echo -e "Username : $Login "
  39. echo -e "Password : $Pass"
  40. echo -e "Aktif Sampai : $exp"