cek-pptp.sh 859 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. red='\e[1;31m'
  3. green='\e[0;32m'
  4. NC='\e[0m'
  5. MYIP=$(wget -qO- ipinfo.io/ip);
  6. echo "Checking VPS"
  7. IZIN=$( curl https://raw.githubusercontent.com/alifnurmareta/premium/main/ipallow | grep $MYIP )
  8. if [ $MYIP = $IZIN ]; then
  9. echo -e "${green}Permission Accepted...${NC}"
  10. else
  11. echo -e "${red}Permission Denied!${NC}";
  12. echo "Only For Premium Users"
  13. exit 0
  14. fi
  15. clear
  16. last | grep ppp | grep still | awk '{print " ",$1," - " $3 }' > /tmp/login-db-pptp.txt;
  17. echo " "
  18. echo " "
  19. echo "===========================================";
  20. echo " "
  21. echo " "
  22. echo "-------------------------------------";
  23. echo " PPTP VPN User Login";
  24. echo "-------------------------------------";
  25. echo "Username --- IP";
  26. echo "-------------------------------------";
  27. cat /tmp/login-db-pptp.txt
  28. echo " "
  29. echo " "
  30. echo " "
  31. echo "===========================================";
  32. echo " ";