import socket
import random
import time
import subprocess

# Remote VPN Server IP Address
ip_address = '147.229.149.249'


port_sequence = [647, 879, 54]

for port_number in port_sequence:
    try:
        client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        client_socket.settimeout(1.0)
        client_socket.connect((ip_address, port_number))
        client_socket.close()
    except socket.error as err:
        print(f"Activating VPN Server port: {port_number}")
        pass
print("Successful activating VPN!")
time.sleep(0.5)


