-
Notifications
You must be signed in to change notification settings - Fork 0
/
refEc.py
68 lines (38 loc) · 1.56 KB
/
refEc.py
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
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from concurrent.futures import ThreadPoolExecutor
import string
import random
import urllib
import requests
#from bs4 import BeautifulSoup
# from timer import timer
refferal_code = input("Enter your referral code : ")
names = []
url = "https://app.upviral.com/embed/request/call/ajax/camp_id/103655/opacity/0.6/widget/iframe/close_popup/no/"
def fetch(session, url):
global names
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
name = id_generator().lower()
email = name+"@1secmail.com"
head = {
'Host' : 'app.upviral.com',
'Content-Type' : 'application/x-www-form-urlencoded',
'User-Agent':'letmelearn'
}
postData = '''itemtype=embed&layout=captcha&c=c&txt_name='''+name+'''&txt_email='''+urllib.parse.quote_plus(email)+'''&LeadSource=upviral+referral&agree=agree&reflink='''+refferal_code+'''&refshare=&lp_id=&uv_submit=submit&opacity=0.6&widget=iframe&close_popup=no&k=0%2F&call=ajax&camp=103655&a=a&captcha=captcha'''
with session.post(url,headers = head,data = postData) as response:
print(response.text)
names.append(name)
# @timer(1, 5)
if __name__ == '__main__':
with ThreadPoolExecutor(max_workers=4) as executor:
with requests.Session() as session:
executor.map(fetch, [session] * 500, [url] * 500)
executor.shutdown(wait=True)
names = sorted(set(names))
file_q = open('clean_list.txt', 'w', encoding='utf-8')
for i in names:
file_q.write(i + '\n')
file_q.close()