D3vil0p3r / htb-toolkit

Play Hack The Box directly on your system.
GNU General Public License v3.0
37 stars 4 forks source link

Any way to cleanly shut off the OpenVPN connection without closing the window ? #4

Closed AkechiShiro closed 8 months ago

AkechiShiro commented 8 months ago

I can kill the openvpn process, but I do not want to close my terminal.

Is this a clean way ? Just so it is documented, I may add a PR to add this to the message saying how to close the openvpn connection. Maybe an enhancement would be to add a flag to the htb-toolkit command in order to cut the openvpn connection ?

I can also just manage it manually, right now.

I'm not using AthenaOS and I believe the tool is pretty tailored for use with others specific tools.

AkechiShiro commented 8 months ago

I've used this for now : https://unix.stackexchange.com/questions/424719/how-do-i-stop-daemonized-openvpn-connection

D3vil0p3r commented 8 months ago

I've used this for now : https://unix.stackexchange.com/questions/424719/how-do-i-stop-daemonized-openvpn-connection

To stop OpenVPN connection, just sudo killall openvpn.

AkechiShiro commented 8 months ago

Then a probable enhancement is : 1 - to get the PID of the openvpn spawned process into temporary file maybe stored in /tmp. 2 - create a new flag in the tool in order to kill the PID of the openvpn that was spawned

But this whole upgrade maybe overkill since it's pretty easy to sudo killall openvpn unless a user has multiples openvpn connections and wants to kill the one to HTB precisely.

I'll close this issue, I may reopen it in the future or link a PR to enhance the tool.