def checkConnection():
    print(((bcolors.ENDC + '\n  [*]  Checking network connection') + bcolors.ENDC))
    conn = http.client.HTTPConnection('www.microsoft.com', 80)
    try:
        conn.request('HEAD', '/')
        print(((bcolors.OKGREEN + '  [+]  Network connection seems OK') + bcolors.ENDC))
    except:
        print(((bcolors.FAIL + '  [-]  Network connection seems down') + bcolors.ENDC))
    print(((bcolors.ENDC + '  [*]  Checking VPN connection') + bcolors.ENDC))
    if (re.match('tun.', 'tun') or (re.match('ppp.', 'ppp') not in psutil.net_if_addrs())):
        print((bcolors.WARNING + '  [-]  No indication of a VPN connection on tun or ppp found.'))
        choice = input(((bcolors.ENDC + '  Continue (y/N): ') + bcolors.OKBLUE))
        if (choice.lower() == 'y'):
            print((bcolors.ENDC + ' '))
        else:
            sys.exit()
    else:
        print(((bcolors.OKGREEN + '  [+]  Indications of a VPN. Good. Will continue.') + bcolors.ENDC))
    startpage()
def checkConnection():
    print(((bcolors.ENDC + '\n  [*]  Checking network connection') + bcolors.ENDC))
    conn = http.client.HTTPConnection('www.microsoft.com', 80)
    try:
        conn.request('HEAD', '/')
        print(((bcolors.OKGREEN + '  [+]  Network connection seems OK') + bcolors.ENDC))
    except:
        print(((bcolors.FAIL + '  [-]  Network connection seems down') + bcolors.ENDC))
    print(((bcolors.ENDC + '  [*]  Checking VPN connection') + bcolors.ENDC))
    if (re.match('tun.', 'tun') or (re.match('ppp.', 'ppp') not in psutil.net_if_addrs())):
        print((bcolors.WARNING + '  [-]  No indication of a VPN connection on tun or ppp found.'))
        choice = input(((bcolors.ENDC + '  Continue (y/N): ') + bcolors.OKBLUE))
        if (choice.lower() == 'y'):
            print((bcolors.ENDC + ' '))
        else:
            sys.exit()
    else:
        print(((bcolors.OKGREEN + '  [+]  Indications of a VPN. Good. Will continue.') + bcolors.ENDC))
    startpage()