Ejemplo n.º 1
0
    def vpn_stop(self):

        #ensures that vpn is currently running, and if not throws an exception
        if (self.get_vpn_status() == False):
            raise VPNError()
        else:
            settings = initialize_vpn("United States", self.__vnp_email, self.__vpn_password)
            close_vpn_connection(settings)
Ejemplo n.º 2
0
    def change_vpn(self):

        #ensures that vpn is connected, and throws an exception if not connected
        if (self.get_vpn_status() != True):
            raise VPNError()
        else:
            settings = initialize_vpn("United States", self.__vpn_email, self.__vpn_password)
            close_vpn_connection(settings)
            time.sleep(10)
            rotate_VPN(settings)
Ejemplo n.º 3
0
def vpnEnd():

    #globals
    global vpnEmail, vpnPass

    #initializes vpn
    settings = initialize_vpn("United States", vpnEmail, vpnPass)

    #disconnects from vpn
    close_vpn_connection(settings)
Ejemplo n.º 4
0
 def disconnect(self):
     close_vpn_connection(self.settings)
Ejemplo n.º 5
0
from nordvpn_connect import initialize_vpn, rotate_VPN, close_vpn_connection

destination = "italy"

nordvpn_username = ""
nordvpn_password = ""

settings = initialize_vpn(destination)
rotate_VPN(settings)

# YOUR STUFF

close_vpn_connection(settings)