def checkNetVPNV():
"""Check if there's a working VPN connection. Verbose."""
# Checking for VPN interfaces
INTERFACE_VPN = (config['NETWORK']['INTERFACE_VPN'])
print(bc.ENDC + '\t[*] Checking if VPN connection is active' + bc.ENDC)
for s in psutil.net_if_addrs():
if any(f in s for f in INTERFACE_VPN.split(',')):
print(bc.OKGREEN + '\t[+] Indications of a VPN. Good. Will continue.' + bc.ENDC)
return None
else:
print(bc.WARN + '\t[-] WARN! No indication of a VPN connection on "tun" or "ppp" found.')
return 'ERROR'
评论列表
文章目录