Skip to content

Instantly share code, notes, and snippets.

@duplaja
Created May 1, 2022 23:12
Show Gist options
  • Save duplaja/14c819b3cf41d2fd9aa007a572bb495a to your computer and use it in GitHub Desktop.
Save duplaja/14c819b3cf41d2fd9aa007a572bb495a to your computer and use it in GitHub Desktop.
Mullvad VPN Check - Python
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