-
Notifications
You must be signed in to change notification settings - Fork 2
/
startVPN.sh
93 lines (78 loc) · 2.42 KB
/
startVPN.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
# Script for connecting to different HTB VPNs
# the current version of the script assumes that you store your VPN config files in $HOME/vpn
# it also assumes that you have not renamed your ovpn config files
# Future version will create the missing dir and check for any ovpn files to be moved to the vpn folder
# this was a quick 10min script that I hope others on the HTB community or any others might find useful when dealing with multiple VPNs
# Created by Tuxnix
#Banner
clear
echo "
▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄
█ █ █ █ █ ▄ █ █ █ █ █ █ █ █ █
█ █▄█ █▄ ▄█ █▄█ █ █ █▄█ █ ▄ █ █▄█ █
█ █ █ █ █ █ █ █ █▄█ █ █
█ ▄ █ █ █ █ ▄ █ █ █ ▄▄▄█ ▄ █
█ █ █ █ █ █ █ █▄█ █ █ ██ █ █ █ █ █
█▄▄█ █▄▄█ █▄▄▄█ █▄▄▄▄▄▄▄█ █▄▄▄█ █▄▄▄█ █▄█ █▄▄█
"
echo ""
echo " "
echo "[!] This will require Sudo access"
echo " "
echo -n "[+] Enter your HTB username:"
read usrName
echo "[?] What VPN would you like to connect to $usrName ?"
echo " "
# Starter labs VIP VPN
starterPoint() {
sudo openvpn $HOME/vpn/starting_point_$usrName.ovpn
}
#Machine Labs VPN
labs() {
sudo openvpn $HOME/vpn/lab_$usrName.ovpn
}
#End Games VPN
endGames() {
sudo openvpn $HOME/vpn/endgames_$usrName.ovpn
}
#Release Arena VPN
releaseArena() {
sudo openvpn $HOME/vpn/release_arena_$usrName.ovpn
}
#Fortresses Labs VPN
fortresses() {
sudo openvpn $HOME/vpn/fortresses_$usrName.ovpn
}
press_enter() {
echo ""
echo -n "[!] Press Enter to continue "
read
clear
}
bad_option() {
echo "[-] Incorrect Option - Please choose another on from the list."
clear
}
until [ "$selection" = "0" ]; do
echo ""
echo " 1 ) Starter Labs "
echo " 2 ) Machines "
echo " 3 ) End Games "
echo " 4 ) Release Arena "
echo " 5 ) Fortresses "
echo " 0 ) Exit "
echo ""
echo -n "[+] Enter your selection : "
read selection
echo ""
case $selection in
1 ) clear ; starterPoint ;;
2 ) clear ; labs ;;
3 ) clear ; endGames;;
4 ) clear ; releaseArena;;
5 ) clear ; fortresses;;
0 ) clear ; exit;;
* ) clear ; bad_option ;press_enter ;
esac
done