-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOVPN_ID_generator.py
More file actions
56 lines (33 loc) · 1.15 KB
/
OVPN_ID_generator.py
File metadata and controls
56 lines (33 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
import random
def generate_credentials():
string_set = "abcdefghijklmnopqrstuvwxyz"
pass_len = 5
rand_string = "".join(random.sample(string_set, pass_len))
return rand_string
def connect():
print('Connecting with tcpvpn...')
global browser
browser = webdriver.Chrome('/media/akshat/Others/Programs/Selenium Webdrivers/chromedriver')
browser.get('https://www.tcpvpn.com/vpn-server-india')
time.sleep(10)
server = browser.find_elements_by_xpath('//*[@id="tcp"]/div[2]/div/form/button')
server[0].click()
return
def create_account(rand_string):
user = browser.find_elements_by_xpath('//*[@id="exampleInputEmail1"]')
user[0].send_keys(rand_string)
passwd = browser.find_elements_by_xpath('//*[@id="exampleInputPassword1"]')
passwd[0].send_keys(rand_string)
create = browser.find_elements_by_xpath('//*[@id="edit-profile"]/button')
create[0].click()
return
rand_string = generate_credentials()
connect()
create_account(rand_string)
print("Account successfully created")
print("username: "+rand_string)
print("password: "+rand_string)
browser.close()