Advertisement
Guest User

vpnbot

a guest
Jun 4th, 2016
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. #!/bin/bash
  2. # VPNBot v3.02 By Strife
  3. # WGET Updated VPN Username/Password
  4. #wget -q http://www.vpnbook.com/freevpn
  5. #cat $PWD/freevpn | grep Username | cut -b 38-47 | sed '2d'
  6. #cat $PWD/freevpn | grep Password | cut -b 25-36 | sed '2d'
  7.  
  8. #cURL method *working*, replaces wget
  9. #curl -silent www.vpnbook.com/freevpn | grep Username: | sed -e '1d' | cut -d ">" -f 3 | cut -d "<" -f 1
  10. #curl -silent www.vpnbook.com/freevpn | grep Password: | sed -e '1d' | cut -d ">" -f 3 | cut -d "<" -f 1
  11.  
  12. #NC method requires no further downloads
  13. printf "GET /freevpn HTTP/1.0\r\n\r\n" | nc www.vpnbook.com 80 | grep Username | sed -d '1d' | cut -d ">" -f 3 | cut -d "<" -f 1
  14. printf "GET /freevpn HTTP/1.0\r\n\r\n" | nc www.vpnbook.com 80 | grep Password | sed -d '1d' | cut -d ">" -f 3 | cut -d "<" -f 1
  15.  
  16. rm freevpn
  17. # Core
  18. case $1 in
  19. -setup)
  20. # mkdir /home/$USER/.ovpn_config
  21. # wget [github URL]
  22.  
  23. ;;
  24. -connect)
  25. cd /home/$USER/.ovpn_config/
  26. sudo openvpn --script-security 2 --config vpnbook-$2-$3$4.ovpn
  27. ;;
  28. -update)
  29. rm -rf /home/$USER/.ovpn_config/*.ovpn
  30. for a in $(cut -f 1 /home/$USER/.ovpn_config/.sources);
  31. do
  32. echo "Downlading Config Files From $a"
  33. wget -q $a
  34. echo "$a" | cut -b 45-80>/home/$USER/.ovpn_config/temp22
  35. echo "Extracting Config Files"
  36. for b in $(cut -f 1 /home/$USER/.ovpn_config/temp22);
  37. do
  38. echo $b
  39. unzip $b
  40. cp *.ovpn /home/$USER/.ovpn_config/
  41. rm $b
  42. rm -rf *.ovpn
  43. done
  44. done
  45. echo "Update Complete, Please Hit Enter"
  46. read pause
  47. reset
  48. ;;
  49. *)
  50. echo "Usage: ./vpn_connect -[VPN Location] [tcp/udp] [Port]"
  51. echo "example: ./vpn_cook -uk1 udp 53"
  52. echo "Locations: US1, US2, Euro1, Euro2, CA1"
  53. echo "TCP Ports: 80, 443"
  54. echo "UDP Ports: 53, 25000"
  55. ;;
  56. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement