Closed suljov closed 10 months ago
@suljov,
Thank you for all these tests. I will analyze all this and it will be fixed on update v1.6.0. Overall this is related to this issue : #86, but I'm keeping both open just in case.
@suljov,
Can you check if « pgrep » and « openvpn » is installed on your machine ? This will be replaced in the future but for now, it is necessary to have the both programs accessible via the PATH.
@suljov,
Can you check if « pgrep » and « openvpn » is installed on your machine ? This will be replaced in the future but for now, it is necessary to have the both programs accessible via the PATH.
yes openvpn is installed and i belive also pgrep is installed since both is installed per default on kali linux?
I also have this problem on Kali. Don't know if it matters that pgrep is in usr/bin and openvpn is in usr/sbin ?
I also have this problem on Kali. Don't know if it matters that pgrep is in usr/bin and openvpn is in usr/sbin ?
It simply needs to be installed and accessible via the PATH
@suljov / @danjo133,
Can you run these commands in your terminal ?
pgrep -fa openvpn
and :
pgrep --version
Thanks !
Running it with no openvpn running, the first gives an empty result, running it with openvpn connected to htb gives:
$ pgrep -fa openvpn
75856 sudo openvpn competitive
$ pgrep --version pgrep from procps-ng 4.0.4
running with sudo: sudo /home/kali/go/bin/htb-cli vpn --start -m competitive A new update is now available (dev) ! (c501fa6e5feb6aa74b8a7b82007c964dd224582b) Update with : git pull
? VPN was not found. Would you like to download it ? Yes 2024-01-16T21:59:34.103+0100 ERROR cmd/vpn.go:122 {"error": "environment variable is not set : HTB_TOKEN\n"}
Thanks @danjo133 - I made a few change in dev.
1) First, can you switch with the dev branch with : go install github.com/GoToolSharing/htb-cli@dev
and check with : htb-cli version
2) Kill all vpn processes with : pkill openvpn
and check with : pgrep -fa openvpn
3) Remove all vpn files with : rm ~/.local/htb-cli/*.ovpn
4) Run this command :
htb-cli vpn -m competitive --start -vvv
Note : You don’t need to run htb-cli with sudo
Seems to have solved it!
❯ htb-cli vpn -m competitive --start -vvv 2024-01-16T22:08:15.019+0100 DEBUG cmd/root.go:24 Verbosity level : 3 2024-01-16T22:08:15.021+0100 INFO config/config.go:180 Loading configuration file... 2024-01-16T22:08:15.025+0100 INFO config/config.go:186 Configuration successfully loaded 2024-01-16T22:08:15.025+0100 DEBUG config/config.go:187 map[Discord:False Update:False] 2024-01-16T22:08:15.025+0100 DEBUG cmd/root.go:30 Check for updates : false 2024-01-16T22:08:15.025+0100 DEBUG update/update.go:14 config.Version: dev 2024-01-16T22:08:15.025+0100 INFO update/update.go:16 Development version detected 2024-01-16T22:08:15.025+0100 DEBUG cmd/root.go:37 Message : Development version (git pull to update) 2024-01-16T22:08:15.025+0100 INFO cmd/vpn.go:18 VPN command executed 2024-01-16T22:08:15.025+0100 DEBUG cmd/vpn.go:55 Mode: competitive 2024-01-16T22:08:15.025+0100 DEBUG vpn/vpn.go:144 VPN config file : [] ? VPN was not found. Would you like to download it ? Yes 2024-01-16T22:08:18.123+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.123+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=competitive 2024-01-16T22:08:18.123+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.123+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:08:18.125+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.125+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=endgames 2024-01-16T22:08:18.126+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.126+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:08:18.127+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.127+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=labs 2024-01-16T22:08:18.128+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.128+0100 DEBUG utils/utils.go:387 Request body: {} ⠋2024-01-16T22:08:18.129+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.129+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=starting_point 2024-01-16T22:08:18.130+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.130+0100 DEBUG utils/utils.go:387 Request body: {} ⠋2024-01-16T22:08:18.130+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.130+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=fortresses 2024-01-16T22:08:18.130+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.130+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:08:18.470+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.470+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/429/0 2024-01-16T22:08:18.470+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.471+0100 DEBUG utils/utils.go:387 Request body: {} ⠋2024-01-16T22:08:18.471+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.471+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/413/0 2024-01-16T22:08:18.472+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.472+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:08:18.486+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.486+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/244/0 2024-01-16T22:08:18.487+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.487+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:08:18.505+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.506+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/314/0 2024-01-16T22:08:18.506+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.506+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:08:18.670+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:08:18.670+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/314/0 2024-01-16T22:08:18.670+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:08:18.670+0100 DEBUG utils/utils.go:387 Request body: {} VPN : EU_Labs_2 downloaded successfully VPN : EU_Endgame_VIP_1 downloaded successfully VPN : EU_Release_Arena_2 downloaded successfully VPN : EU_Fortress_1 downloaded successfully VPN : EU_StartingPoint_VIP_1 downloaded successfully
VPNs are located at the following path : /home/kali/.local/htb-cli 2024-01-16T22:08:20.970+0100 INFO vpn/vpn.go:154 VPN is starting... 2024-01-16T22:08:21.024+0100 DEBUG vpn/vpn.go:164 VPN processes: [] VPN Started Successfully! 2024-01-16T22:08:22.720+0100 INFO cmd/vpn.go:139 Exit vpn command correctly
❯ ps aux | grep openvpn kali 128468 0.0 0.0 2584 1664 pts/1 S 22:08 0:00 sh -c sudo openvpn /home/kali/.local/htb-cli/Release_Arena root 128469 0.0 0.0 16412 6528 pts/1 S 22:08 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 128470 0.0 0.0 16412 2004 pts/3 Ss+ 22:08 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 128471 0.2 0.1 15620 9984 pts/3 S 22:08 0:00 openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn kali 128615 0.0 0.0 6348 2176 pts/1 S+ 22:08 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox openvpn
Can you check your interfaces with : ip a
/ ifconfig
VPN should be up
Should work
Thanks for testing @danjo133 !
@suljov, can you doble check following these steps ? https://github.com/GoToolSharing/htb-cli/issues/100#issuecomment-1894513017
Yep, after the switch to dev, I can reach monitored.htb
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether
Yep, after the switch to dev, I can reach monitored.htb
ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host noprefixroute valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether brd ff:ff:ff:ff:ff:ff inet /24 brd 10.0.2.255 scope global dynamic noprefixroute eth0 valid_lft 83950sec preferred_lft 83950sec inet6 /64 scope link noprefixroute valid_lft forever preferred_lft forever 3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default link/ether brd ff:ff:ff:ff:ff:ff inet /16 brd 172.17.255.255 scope global docker0 valid_lft forever preferred_lft forever 4: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default link/ether brd ff:ff:ff:ff:ff:ff inet /32 scope global flannel.1 valid_lft forever preferred_lft forever inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 5: cni0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UP group default qlen 1000 link/ether brd ff:ff:ff:ff:ff:ff inet /24 brd 10.42.0.255 scope global cni0 valid_lft forever preferred_lft forever inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 6: veth08e9fd9c@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default link/ether inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 7: vethb9c382f6@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default link/ether inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 8: vetha952c42e@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default link/ether inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 9: vethe287b210@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default link/ether inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 10: veth0ae746e5@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default link/ether inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 11: veth6e6f11c3@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue master cni0 state UP group default link/ether inet6 /64 scope link proto kernel_ll valid_lft forever preferred_lft forever 13: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500 link/none inet /23 scope global tun0 valid_lft forever preferred_lft forever inet6 dead:beef:/64 scope global valid_lft forever preferred_lft forever inet6 /64 scope link stable-privacy proto kernel_ll valid_lft forever preferred_lft forever
Enjoy :tada:
re-running listed steps:
❯ go install github.com/GoToolSharing/htb-cli@dev ~/dev/ctf/htb │ master ?115 ❯ htb-cli version Development version (dev branch)
❯ ps aux | grep openvpn kali 128468 0.0 0.0 2584 1664 pts/1 S 22:08 0:00 sh -c sudo openvpn /home/kali/.local/htb-cli/Release_Arena root 128469 0.0 0.0 16412 6528 pts/1 S 22:08 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 128470 0.0 0.0 16412 2004 pts/3 Ss+ 22:08 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 128471 0.0 0.1 15620 9984 pts/3 S 22:08 0:00 openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn kali 143346 0.0 0.0 6348 2048 pts/1 S+ 22:22 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox openvpn
❯ pkill openvpn pkill: killing pid 128471 failed: Operation not permitted
❯ sudo pkill openvpn
❯ ps aux | grep openvpn kali 143586 0.0 0.0 6348 2176 pts/1 S+ 22:22 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox openvpn
❯ pgrep -fa openvpn
❯ rm ~/.local/htb-cli/*.ovpn
❯ htb-cli vpn -m competitive --start -vvv 2024-01-16T22:23:16.782+0100 DEBUG cmd/root.go:24 Verbosity level : 3 2024-01-16T22:23:16.782+0100 INFO config/config.go:180 Loading configuration file... 2024-01-16T22:23:16.782+0100 INFO config/config.go:186 Configuration successfully loaded 2024-01-16T22:23:16.783+0100 DEBUG config/config.go:187 map[Discord:False Update:False] 2024-01-16T22:23:16.783+0100 DEBUG cmd/root.go:30 Check for updates : false 2024-01-16T22:23:16.783+0100 DEBUG update/update.go:14 config.Version: dev 2024-01-16T22:23:16.783+0100 INFO update/update.go:16 Development version detected 2024-01-16T22:23:16.783+0100 DEBUG cmd/root.go:37 Message : Development version (git pull to update) 2024-01-16T22:23:16.783+0100 INFO cmd/vpn.go:18 VPN command executed 2024-01-16T22:23:16.783+0100 DEBUG cmd/vpn.go:55 Mode: competitive 2024-01-16T22:23:16.783+0100 DEBUG vpn/vpn.go:144 VPN config file : [] ? VPN was not found. Would you like to download it ? Yes 2024-01-16T22:23:20.371+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.371+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=labs 2024-01-16T22:23:20.371+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.371+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.372+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=competitive 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} ⠋2024-01-16T22:23:20.373+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=endgames 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.373+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=starting_point 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} ⠋2024-01-16T22:23:20.373+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=fortresses 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.692+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.692+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/413/0 2024-01-16T22:23:20.692+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.693+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.693+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.694+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/429/0 2024-01-16T22:23:20.694+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.695+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.700+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.700+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/314/0 2024-01-16T22:23:20.701+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.701+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.770+0100 INFO utils/utils.go:384 Sending an HTTP HTB request ⠋2024-01-16T22:23:20.770+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/244/0 2024-01-16T22:23:20.770+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.770+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.858+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.859+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/314/0 2024-01-16T22:23:20.859+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.859+0100 DEBUG utils/utils.go:387 Request body: {} VPN : EU_Labs_2 downloaded successfully VPN : EU_Endgame_VIP_1 downloaded successfully VPN : EU_Release_Arena_2 downloaded successfully VPN : EU_StartingPoint_VIP_1 downloaded successfully VPN : EU_Fortress_1 downloaded successfully
VPNs are located at the following path : /home/kali/.local/htb-cli 2024-01-16T22:23:23.470+0100 INFO vpn/vpn.go:154 VPN is starting... 2024-01-16T22:23:23.511+0100 DEBUG vpn/vpn.go:164 VPN processes: [] VPN Started Successfully! 2024-01-16T22:23:26.567+0100 INFO cmd/vpn.go:139 Exit vpn command correctly
❯ ps aux | grep openvpn kali 144289 0.0 0.0 2584 1536 pts/1 S 22:23 0:00 sh -c sudo openvpn /home/kali/.local/htb-cli/Release_Arena root 144290 0.1 0.0 16412 6528 pts/1 S 22:23 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 144291 0.0 0.0 16412 1896 pts/3 Ss+ 22:23 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 144292 0.2 0.1 15620 9984 pts/3 S 22:23 0:00 openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn kali 144444 0.0 0.0 6348 2176 pts/1 S+ 22:23 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox openvpn
It works fine, htb shows green checkbox around connection and I can access the 10-network of htb.
Thanks for the Super quick fix!
Now you can use : htb-cli vpn -m competitive --start
and htb-cli vpn --stop
to manage vpns (https://htb-cli-documentation.qu35t.pw/commands/vpn/)
re-running listed steps:
❯ go install github.com/GoToolSharing/htb-cli@dev ~/dev/ctf/htb │ master ?115 ❯ htb-cli version Development version (dev branch)
❯ ps aux | grep openvpn kali 128468 0.0 0.0 2584 1664 pts/1 S 22:08 0:00 sh -c sudo openvpn /home/kali/.local/htb-cli/_ReleaseArena root 128469 0.0 0.0 16412 6528 pts/1 S 22:08 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 128470 0.0 0.0 16412 2004 pts/3 Ss+ 22:08 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 128471 0.0 0.1 15620 9984 pts/3 S 22:08 0:00 openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn kali 143346 0.0 0.0 6348 2048 pts/1 S+ 22:22 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox openvpn
❯ pkill openvpn pkill: killing pid 128471 failed: Operation not permitted
❯ sudo pkill openvpn
❯ ps aux | grep openvpn kali 143586 0.0 0.0 6348 2176 pts/1 S+ 22:22 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox openvpn
❯ pgrep -fa openvpn
❯ rm ~/.local/htb-cli/*.ovpn
❯ htb-cli vpn -m competitive --start -vvv 2024-01-16T22:23:16.782+0100 DEBUG cmd/root.go:24 Verbosity level : 3 2024-01-16T22:23:16.782+0100 INFO config/config.go:180 Loading configuration file... 2024-01-16T22:23:16.782+0100 INFO config/config.go:186 Configuration successfully loaded 2024-01-16T22:23:16.783+0100 DEBUG config/config.go:187 map[Discord:False Update:False] 2024-01-16T22:23:16.783+0100 DEBUG cmd/root.go:30 Check for updates : false 2024-01-16T22:23:16.783+0100 DEBUG update/update.go:14 config.Version: dev 2024-01-16T22:23:16.783+0100 INFO update/update.go:16 Development version detected 2024-01-16T22:23:16.783+0100 DEBUG cmd/root.go:37 Message : Development version (git pull to update) 2024-01-16T22:23:16.783+0100 INFO cmd/vpn.go:18 VPN command executed 2024-01-16T22:23:16.783+0100 DEBUG cmd/vpn.go:55 Mode: competitive 2024-01-16T22:23:16.783+0100 DEBUG vpn/vpn.go:144 VPN config file : [] ? VPN was not found. Would you like to download it ? Yes 2024-01-16T22:23:20.371+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.371+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=labs 2024-01-16T22:23:20.371+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.371+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.372+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=competitive 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} ⠋2024-01-16T22:23:20.373+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=endgames 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.373+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=starting_point 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} ⠋2024-01-16T22:23:20.373+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/connections/servers?product=fortresses 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.373+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.692+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.692+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/413/0 2024-01-16T22:23:20.692+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.693+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.693+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.694+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/429/0 2024-01-16T22:23:20.694+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.695+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.700+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.700+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/314/0 2024-01-16T22:23:20.701+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.701+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.770+0100 INFO utils/utils.go:384 Sending an HTTP HTB request ⠋2024-01-16T22:23:20.770+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/244/0 2024-01-16T22:23:20.770+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.770+0100 DEBUG utils/utils.go:387 Request body: {} 2024-01-16T22:23:20.858+0100 INFO utils/utils.go:384 Sending an HTTP HTB request 2024-01-16T22:23:20.859+0100 DEBUG utils/utils.go:385 Request URL: https://labs.hackthebox.com/api/v4/access/ovpnfile/314/0 2024-01-16T22:23:20.859+0100 DEBUG utils/utils.go:386 Request method: GET 2024-01-16T22:23:20.859+0100 DEBUG utils/utils.go:387 Request body: {} VPN : EU_Labs_2 downloaded successfully VPN : EU_Endgame_VIP_1 downloaded successfully VPN : EU_Release_Arena_2 downloaded successfully VPN : EU_StartingPoint_VIP_1 downloaded successfully VPN : EU_Fortress_1 downloaded successfully
VPNs are located at the following path : /home/kali/.local/htb-cli 2024-01-16T22:23:23.470+0100 INFO vpn/vpn.go:154 VPN is starting... 2024-01-16T22:23:23.511+0100 DEBUG vpn/vpn.go:164 VPN processes: [] VPN Started Successfully! 2024-01-16T22:23:26.567+0100 INFO cmd/vpn.go:139 Exit vpn command correctly
❯ ps aux | grep openvpn kali 144289 0.0 0.0 2584 1536 pts/1 S 22:23 0:00 sh -c sudo openvpn /home/kali/.local/htb-cli/_ReleaseArena root 144290 0.1 0.0 16412 6528 pts/1 S 22:23 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 144291 0.0 0.0 16412 1896 pts/3 Ss+ 22:23 0:00 sudo openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn root 144292 0.2 0.1 15620 9984 pts/3 S 22:23 0:00 openvpn /home/kali/.local/htb-cli/EU_Release_Arena_2-vpn.ovpn kali 144444 0.0 0.0 6348 2176 pts/1 S+ 22:23 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox openvpn
It works fine, htb shows green checkbox around connection and I can access the 10-network of htb.
Thanks for the Super quick fix!
```shell htb-cli vpn -m competitive --start -vvv
yes it kinda seems to work. tho did i try it on my kali in wsl but should be no diff in a vm. tho i cant start the comp.
$ htb-cli vpn -m competitive --start
? VPN was not found. Would you like to download it ? Yes
You do not have permissions to download the following vpn: endgames
VPN : EU_Labs_1 downloaded successfully
VPN : EU_Release_Arena_1 downloaded successfully
VPN : downloaded successfully
VPN : EU_Fortress_1 downloaded successfully
VPNs are located at the following path : /home/suljov/.local/htb-cli
VPN Started Successfully!
┌──(suljov㉿electroville)-[~]
└─$ htb-cli vpn -m competitive --start
2024-01-17T12:14:59.195+0100 ERROR cmd/vpn.go:122 {"error": "error reading file /home/suljov/.local/htb-cli/*Release_Arena*: open /home/suljov/.local/htb-cli/*Release_Arena*: no such file or directory"}
github.com/GoToolSharing/htb-cli/cmd.glob..func15
/home/suljov/htb-cli/cmd/vpn.go:122
github.com/spf13/cobra.(*Command).execute
/home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876
github.com/spf13/cobra.(*Command).ExecuteC
/home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990
github.com/spf13/cobra.(*Command).Execute
/home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/GoToolSharing/htb-cli/cmd.Execute
/home/suljov/htb-cli/cmd/root.go:46
main.main
/home/suljov/htb-cli/main.go:8
runtime.main
/usr/lib/go/src/runtime/proc.go:267
┌──(suljov㉿electroville)-[~]
└─$ ls /home/suljov/.local/htb-cli/
default.conf EU_Fortress_1-vpn.ovpn EU_Labs_1-vpn.ovpn EU_Release_Arena_1-vpn.ovpn -vpn.ovpn
$ htb-cli vpn -m competitive --start -vvv
2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:24 Verbosity level : 3
2024-01-17T12:16:39.854+0100 INFO config/config.go:180 Loading configuration file...
2024-01-17T12:16:39.854+0100 INFO config/config.go:186 Configuration successfully loaded
2024-01-17T12:16:39.854+0100 DEBUG config/config.go:187 map[Discord:False Update:False]
2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:30 Check for updates : false
2024-01-17T12:16:39.854+0100 DEBUG update/update.go:14 config.Version: dev
2024-01-17T12:16:39.854+0100 INFO update/update.go:16 Development version detected
2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:37 Message : Development version (git pull to update)
2024-01-17T12:16:39.854+0100 INFO cmd/vpn.go:18 VPN command executed
2024-01-17T12:16:39.854+0100 DEBUG cmd/vpn.go:55 Mode: competitive
2024-01-17T12:16:39.854+0100 DEBUG vpn/vpn.go:144 VPN config file : [/home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn]
2024-01-17T12:16:39.854+0100 INFO vpn/vpn.go:154 VPN is starting...
2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:164 VPN processes: [suljov 1212 0.0 0.0 2580 888 pts/0 S 12:12 0:00 sh -c sudo openvpn /home/suljov/.local/htb-cli/*Release_Arena* root 1213 0.0 0.0 15920 6244 pts/0 S 12:12 0:00 sudo openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn root 1214 0.0 0.0 15920 940 pts/1 Ss+ 12:12 0:00 sudo openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn root 1215 0.0 0.1 14512 9564 pts/1 S 12:12 0:00 openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn ]
2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:174 parts: [suljov 1212 0.0 0.0 2580 888 pts/0 S 12:12 0:00 sh -c sudo openvpn /home/suljov/.local/htb-cli/*Release_Arena*]
2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:176 processPath: /home/suljov/.local/htb-cli/*Release_Arena*
2024-01-17T12:16:39.856+0100 ERROR cmd/vpn.go:122 {"error": "error reading file /home/suljov/.local/htb-cli/*Release_Arena*: open /home/suljov/.local/htb-cli/*Release_Arena*: no such file or directory"}
github.com/GoToolSharing/htb-cli/cmd.glob..func15
/home/suljov/htb-cli/cmd/vpn.go:122
github.com/spf13/cobra.(*Command).execute
/home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876
github.com/spf13/cobra.(*Command).ExecuteC
/home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990
github.com/spf13/cobra.(*Command).Execute
/home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918
github.com/GoToolSharing/htb-cli/cmd.Execute
/home/suljov/htb-cli/cmd/root.go:46
main.main
/home/suljov/htb-cli/main.go:8
runtime.main
/usr/lib/go/src/runtime/proc.go:267
```shell htb-cli vpn -m competitive --start -vvv
yes it kinda seems to work. tho did i try it on my kali in wsl but should be no diff in a vm. tho i cant start the comp.
$ htb-cli vpn -m competitive --start ? VPN was not found. Would you like to download it ? Yes You do not have permissions to download the following vpn: endgames VPN : EU_Labs_1 downloaded successfully VPN : EU_Release_Arena_1 downloaded successfully VPN : downloaded successfully VPN : EU_Fortress_1 downloaded successfully VPNs are located at the following path : /home/suljov/.local/htb-cli VPN Started Successfully! ┌──(suljov㉿electroville)-[~] └─$ htb-cli vpn -m competitive --start 2024-01-17T12:14:59.195+0100 ERROR cmd/vpn.go:122 {"error": "error reading file /home/suljov/.local/htb-cli/*Release_Arena*: open /home/suljov/.local/htb-cli/*Release_Arena*: no such file or directory"} github.com/GoToolSharing/htb-cli/cmd.glob..func15 /home/suljov/htb-cli/cmd/vpn.go:122 github.com/spf13/cobra.(*Command).execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 github.com/spf13/cobra.(*Command).ExecuteC /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 github.com/spf13/cobra.(*Command).Execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918 github.com/GoToolSharing/htb-cli/cmd.Execute /home/suljov/htb-cli/cmd/root.go:46 main.main /home/suljov/htb-cli/main.go:8 runtime.main /usr/lib/go/src/runtime/proc.go:267 ┌──(suljov㉿electroville)-[~] └─$ ls /home/suljov/.local/htb-cli/ default.conf EU_Fortress_1-vpn.ovpn EU_Labs_1-vpn.ovpn EU_Release_Arena_1-vpn.ovpn -vpn.ovpn
$ htb-cli vpn -m competitive --start -vvv 2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:24 Verbosity level : 3 2024-01-17T12:16:39.854+0100 INFO config/config.go:180 Loading configuration file... 2024-01-17T12:16:39.854+0100 INFO config/config.go:186 Configuration successfully loaded 2024-01-17T12:16:39.854+0100 DEBUG config/config.go:187 map[Discord:False Update:False] 2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:30 Check for updates : false 2024-01-17T12:16:39.854+0100 DEBUG update/update.go:14 config.Version: dev 2024-01-17T12:16:39.854+0100 INFO update/update.go:16 Development version detected 2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:37 Message : Development version (git pull to update) 2024-01-17T12:16:39.854+0100 INFO cmd/vpn.go:18 VPN command executed 2024-01-17T12:16:39.854+0100 DEBUG cmd/vpn.go:55 Mode: competitive 2024-01-17T12:16:39.854+0100 DEBUG vpn/vpn.go:144 VPN config file : [/home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn] 2024-01-17T12:16:39.854+0100 INFO vpn/vpn.go:154 VPN is starting... 2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:164 VPN processes: [suljov 1212 0.0 0.0 2580 888 pts/0 S 12:12 0:00 sh -c sudo openvpn /home/suljov/.local/htb-cli/*Release_Arena* root 1213 0.0 0.0 15920 6244 pts/0 S 12:12 0:00 sudo openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn root 1214 0.0 0.0 15920 940 pts/1 Ss+ 12:12 0:00 sudo openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn root 1215 0.0 0.1 14512 9564 pts/1 S 12:12 0:00 openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn ] 2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:174 parts: [suljov 1212 0.0 0.0 2580 888 pts/0 S 12:12 0:00 sh -c sudo openvpn /home/suljov/.local/htb-cli/*Release_Arena*] 2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:176 processPath: /home/suljov/.local/htb-cli/*Release_Arena* 2024-01-17T12:16:39.856+0100 ERROR cmd/vpn.go:122 {"error": "error reading file /home/suljov/.local/htb-cli/*Release_Arena*: open /home/suljov/.local/htb-cli/*Release_Arena*: no such file or directory"} github.com/GoToolSharing/htb-cli/cmd.glob..func15 /home/suljov/htb-cli/cmd/vpn.go:122 github.com/spf13/cobra.(*Command).execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 github.com/spf13/cobra.(*Command).ExecuteC /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 github.com/spf13/cobra.(*Command).Execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918 github.com/GoToolSharing/htb-cli/cmd.Execute /home/suljov/htb-cli/cmd/root.go:46 main.main /home/suljov/htb-cli/main.go:8 runtime.main /usr/lib/go/src/runtime/proc.go:267
Please, can you run :
rm -rf ~/.local/htb-cli/*.ovpn
pkill openvpn
htb-cli vpn --list
htb-cli vpn -m competitive --start -vvv
ls -la /home/suljov/.local/htb-cli/
```shell htb-cli vpn -m competitive --start -vvv
yes it kinda seems to work. tho did i try it on my kali in wsl but should be no diff in a vm. tho i cant start the comp.
$ htb-cli vpn -m competitive --start ? VPN was not found. Would you like to download it ? Yes You do not have permissions to download the following vpn: endgames VPN : EU_Labs_1 downloaded successfully VPN : EU_Release_Arena_1 downloaded successfully VPN : downloaded successfully VPN : EU_Fortress_1 downloaded successfully VPNs are located at the following path : /home/suljov/.local/htb-cli VPN Started Successfully! ┌──(suljov㉿electroville)-[~] └─$ htb-cli vpn -m competitive --start 2024-01-17T12:14:59.195+0100 ERROR cmd/vpn.go:122 {"error": "error reading file /home/suljov/.local/htb-cli/*Release_Arena*: open /home/suljov/.local/htb-cli/*Release_Arena*: no such file or directory"} github.com/GoToolSharing/htb-cli/cmd.glob..func15 /home/suljov/htb-cli/cmd/vpn.go:122 github.com/spf13/cobra.(*Command).execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 github.com/spf13/cobra.(*Command).ExecuteC /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 github.com/spf13/cobra.(*Command).Execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918 github.com/GoToolSharing/htb-cli/cmd.Execute /home/suljov/htb-cli/cmd/root.go:46 main.main /home/suljov/htb-cli/main.go:8 runtime.main /usr/lib/go/src/runtime/proc.go:267 ┌──(suljov㉿electroville)-[~] └─$ ls /home/suljov/.local/htb-cli/ default.conf EU_Fortress_1-vpn.ovpn EU_Labs_1-vpn.ovpn EU_Release_Arena_1-vpn.ovpn -vpn.ovpn
$ htb-cli vpn -m competitive --start -vvv 2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:24 Verbosity level : 3 2024-01-17T12:16:39.854+0100 INFO config/config.go:180 Loading configuration file... 2024-01-17T12:16:39.854+0100 INFO config/config.go:186 Configuration successfully loaded 2024-01-17T12:16:39.854+0100 DEBUG config/config.go:187 map[Discord:False Update:False] 2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:30 Check for updates : false 2024-01-17T12:16:39.854+0100 DEBUG update/update.go:14 config.Version: dev 2024-01-17T12:16:39.854+0100 INFO update/update.go:16 Development version detected 2024-01-17T12:16:39.854+0100 DEBUG cmd/root.go:37 Message : Development version (git pull to update) 2024-01-17T12:16:39.854+0100 INFO cmd/vpn.go:18 VPN command executed 2024-01-17T12:16:39.854+0100 DEBUG cmd/vpn.go:55 Mode: competitive 2024-01-17T12:16:39.854+0100 DEBUG vpn/vpn.go:144 VPN config file : [/home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn] 2024-01-17T12:16:39.854+0100 INFO vpn/vpn.go:154 VPN is starting... 2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:164 VPN processes: [suljov 1212 0.0 0.0 2580 888 pts/0 S 12:12 0:00 sh -c sudo openvpn /home/suljov/.local/htb-cli/*Release_Arena* root 1213 0.0 0.0 15920 6244 pts/0 S 12:12 0:00 sudo openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn root 1214 0.0 0.0 15920 940 pts/1 Ss+ 12:12 0:00 sudo openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn root 1215 0.0 0.1 14512 9564 pts/1 S 12:12 0:00 openvpn /home/suljov/.local/htb-cli/EU_Release_Arena_1-vpn.ovpn ] 2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:174 parts: [suljov 1212 0.0 0.0 2580 888 pts/0 S 12:12 0:00 sh -c sudo openvpn /home/suljov/.local/htb-cli/*Release_Arena*] 2024-01-17T12:16:39.856+0100 DEBUG vpn/vpn.go:176 processPath: /home/suljov/.local/htb-cli/*Release_Arena* 2024-01-17T12:16:39.856+0100 ERROR cmd/vpn.go:122 {"error": "error reading file /home/suljov/.local/htb-cli/*Release_Arena*: open /home/suljov/.local/htb-cli/*Release_Arena*: no such file or directory"} github.com/GoToolSharing/htb-cli/cmd.glob..func15 /home/suljov/htb-cli/cmd/vpn.go:122 github.com/spf13/cobra.(*Command).execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:876 github.com/spf13/cobra.(*Command).ExecuteC /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:990 github.com/spf13/cobra.(*Command).Execute /home/suljov/pkg/mod/github.com/spf13/cobra@v1.5.0/command.go:918 github.com/GoToolSharing/htb-cli/cmd.Execute /home/suljov/htb-cli/cmd/root.go:46 main.main /home/suljov/htb-cli/main.go:8 runtime.main /usr/lib/go/src/runtime/proc.go:267
Please, can you run :
rm -rf ~/.local/htb-cli/*.ovpn pkill openvpn htb-cli vpn --list htb-cli vpn -m competitive --start -vvv ls -la /home/suljov/.local/htb-cli/
i kinda fixed it. i just re-installed using the command
go install github.com/GoToolSharing/htb-cli@dev
and made sure everything is in the PATH. tho i think this error comes up cuz if you try to start/download the vpn again then it gets a error. not sure.
but it seems to work. i just didnt read the docs enough to test start a comp machine the right way.
good job mate!
It's only a v1, a few checks are missing to avoid bugs like this one. It's cool if it works 🎉
It's only a v1, a few checks are missing to avoid bugs like this one. It's cool if it works 🎉
nice!
one thing to maybe look over is that it takes some time to fetch the ip of the machine. maybe look over it and see if it can get better/faster. this might be just on my machine idk
Which machine's ip are you trying to retrieve? release ?
It's only a v1, a few checks are missing to avoid bugs like this one. It's cool if it works 🎉
nice!
one thing to maybe look over is that it takes some time to fetch the ip of the machine. maybe look over it and see if it can get better/faster. this might be just on my machine idk
Which machine's ip are you trying to retrieve?
It's only a v1, a few checks are missing to avoid bugs like this one. It's cool if it works 🎉
nice! one thing to maybe look over is that it takes some time to fetch the ip of the machine. maybe look over it and see if it can get better/faster. this might be just on my machine idk
the comp machine. currently its Monitored. right now htb-cli is just waiting to fetch ip. the tool can start the machine no problem.
Which machine's ip are you trying to retrieve?
It's only a v1, a few checks are missing to avoid bugs like this one. It's cool if it works 🎉
nice! one thing to maybe look over is that it takes some time to fetch the ip of the machine. maybe look over it and see if it can get better/faster. this might be just on my machine idk
the comp machine. currently its Monitored. right now htb-cli is just waiting to fetch ip. the tool can start the machine no problem.
Can you compare with this command ?
❯ time htb-cli start -m Monitored
? The following machine was found : Monitored Yes
Machine spawned! Playing on the competitive server
Target: 10.129.237.169
htb-cli start -m Monitored 0.04s user 0.02s system 1% cpu 3.632 total
Can be related to this issue : https://github.com/GoToolSharing/htb-cli/issues/98
Which machine's ip are you trying to retrieve?
It's only a v1, a few checks are missing to avoid bugs like this one. It's cool if it works 🎉
nice! one thing to maybe look over is that it takes some time to fetch the ip of the machine. maybe look over it and see if it can get better/faster. this might be just on my machine idk
the comp machine. currently its Monitored. right now htb-cli is just waiting to fetch ip. the tool can start the machine no problem.
Can you compare with this command ?
❯ time htb-cli start -m Monitored ? The following machine was found : Monitored Yes Machine spawned! Playing on the competitive server Target: 10.129.237.169 htb-cli start -m Monitored 0.04s user 0.02s system 1% cpu 3.632 total
get the same no mather what. kinda
$ time htb-cli start -m Monitored
? The following machine was found : Monitored Yes
⠸ Waiting for the machine to start in order to fetch the IP address (this might take a while).
$ time htb-cli start -m Monitored
? The following machine was found : Monitored Yes
Machine spawned! Playing on a free server
Target:
real 507.13s
user 0.99s
sys 1.63s
cpu 0%
get no ip tho
Which machine's ip are you trying to retrieve?
It's only a v1, a few checks are missing to avoid bugs like this one. It's cool if it works 🎉
nice! one thing to maybe look over is that it takes some time to fetch the ip of the machine. maybe look over it and see if it can get better/faster. this might be just on my machine idk
the comp machine. currently its Monitored. right now htb-cli is just waiting to fetch ip. the tool can start the machine no problem.
Can you compare with this command ?
❯ time htb-cli start -m Monitored ? The following machine was found : Monitored Yes Machine spawned! Playing on the competitive server Target: 10.129.237.169 htb-cli start -m Monitored 0.04s user 0.02s system 1% cpu 3.632 total
get the same no mather what. kinda
$ time htb-cli start -m Monitored ? The following machine was found : Monitored Yes ⠸ Waiting for the machine to start in order to fetch the IP address (this might take a while).
$ time htb-cli start -m Monitored ? The following machine was found : Monitored Yes Machine spawned! Playing on a free server Target: real 507.13s user 0.99s sys 1.63s cpu 0%
get no ip tho
Yes it's this issue -> #98
Let's move on to the other issue
OBS: i dont really know GO and how it works hence why im here kinda.
Got it to work so it downloads the VPN(s)
but staring for exmaple competitive dont work
for debbuging:
Also tried to dowload the pre-compiled binarie and use it but didnt work either
also tried this:
here if i try to start labs
and here is competitive (in the same folder as the vpn:s etc)