Created
May 1, 2022 23:12
-
-
Save duplaja/14c819b3cf41d2fd9aa007a572bb495a to your computer and use it in GitHub Desktop.
Mullvad VPN Check - Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
result = subprocess.run(['mullvad', 'status'], stdout=subprocess.PIPE) | |
mullvad_status = result.stdout.decode('utf-8') | |
if 'Disconnected' in mullvad_status: | |
print('Mullvad VPN is Disconnected: Connect and try again') | |
quit() | |
else: | |
print('Mullvad VPN is Active, continuing: ') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment