-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathwp-plus.py
168 lines (147 loc) · 5.16 KB
/
wp-plus.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
import urllib.request
import json
import datetime
import random
import string
import time
import os
import sys
import pathlib
script_version = '4.1.0 beta'
window_title = f"WARP-PLUS-CLOUDFLARE By ALIILAPRO (version {script_version})"
os.system('title ' + window_title if os.name ==
'nt' else 'PS1="\[\e]0;' + window_title + '\a\]"; echo $PS1')
os.system('cls' if os.name == 'nt' else 'clear')
print(" *********************************")
print(" WARP-PLUS-CLOUDFLARE By ALIILAPRO")
print(" *********************************")
print("")
print("[+] ABOUT SCRIPT:")
print("[-] With this script, you can getting unlimited GB on Warp+.")
print(f"[-] Version: {script_version}")
print("--------")
print("[+] THIS SCRIPT CODDED BY ALIILAPRO")
print("[-] SITE: aliilapro.github.io")
print("[-] TELEGRAM: aliilapro")
print("--------")
proxy_url = 'https://raw.githubusercontent.com/ALIILAPRO/Proxy/main/http.txt'
response = urllib.request.urlopen(proxy_url)
proxy_list = response.read().decode('utf-8').splitlines()
proxy_file = 'proxy.txt'
with open(proxy_file, 'w') as file:
for proxy in proxy_list:
file.write(proxy + '\n')
with open(proxy_file, 'r') as file:
proxy_list = [line.strip() for line in file]
def newID():
while True:
referrer = input("[#] Enter the WARP+ ID: ")
user_input = input(f"[?] Your ID = ({referrer}) is it correct? (y/n):")
if user_input == "y":
save_id = input("[?] Do you want to save your ID? (y/n):")
if save_id == "y":
with open("referrer.txt", "w") as file:
file.write(referrer)
return referrer
elif save_id == "n":
return referrer
else:
print(f"\"{save_id}\" is not a valid parameter.")
elif user_input == "n":
user_input = None
else:
print(f"\"{user_input}\" is not a valid parameter.")
def progressBar():
animation = ["[□□□□□□□□□□]", "[■□□□□□□□□□]", "[■■□□□□□□□□]", "[■■■□□□□□□□]", "[■■■■□□□□□□]",
"[■■■■■□□□□□]", "[■■■■■■□□□□]", "[■■■■■■■□□□]", "[■■■■■■■■□□]", "[■■■■■■■■■□]"]
progress_anim = 0
save_anim = animation[progress_anim % len(animation)]
percent = 0
while True:
for i in range(10):
percent += 1
sys.stdout.write(f"\r[+] Waiting response... " +
save_anim + f" {percent}%")
sys.stdout.flush()
time.sleep(0.075)
progress_anim += 1
save_anim = animation[progress_anim % len(animation)]
if percent == 100:
sys.stdout.write("\r[+] Request completed... [■■■■■■■■■■] 100%")
break
def genString(stringLength):
try:
letters = string.ascii_letters + string.digits
return ''.join(random.choice(letters) for i in range(stringLength))
except Exception as error:
print(error)
def digitString(stringLength):
try:
digit = string.digits
return ''.join((random.choice(digit) for i in range(stringLength)))
except Exception as error:
print(error)
url = f'https://api.cloudflareclient.com/v0a{digitString(3)}/reg'
def run():
try:
install_id = genString(22)
body = {"key": "{}=".format(genString(43)),
"install_id": install_id,
"fcm_token": "{}:APA91b{}".format(install_id, genString(134)),
"referrer": referrer,
"warp_enabled": False,
"tos": datetime.datetime.now().isoformat()[:-3] + "+02:00",
"type": "Android",
"locale": "es_ES"}
data = json.dumps(body).encode('utf8')
headers = {'Content-Type': 'application/json; charset=UTF-8',
'Host': 'api.cloudflareclient.com',
'Connection': 'Keep-Alive',
'Accept-Encoding': 'gzip',
'User-Agent': 'okhttp/3.12.1'
}
req = urllib.request.Request(url, data, headers)
response = urllib.request.urlopen(req)
status_code = response.getcode()
return status_code
except Exception as error:
print("")
print(error)
if pathlib.Path("referrer.txt").exists():
while True:
user_input = input("[?] Do you want to use saved WARP+ ID? (y/n):")
if user_input == "y":
with open("referrer.txt", "r") as file:
referrer = file.read().strip()
break
elif user_input == "n":
referrer = newID()
break
else:
print(f"\"{user_input}\" is not a valid parameter.")
else:
referrer = newID()
g = 0
b = 0
for proxy_url in proxy_list:
os.system('cls' if os.name == 'nt' else 'clear')
print(" *********************************")
print(" WARP-PLUS-CLOUDFLARE By ALIILAPRO")
print(" *********************************")
print("")
try:
print(f"[#] Total: Good {g} Bad {b}")
sys.stdout.write("\r[+] Sending request... [□□□□□□□□□□] 0%")
sys.stdout.flush()
proxy_handler = urllib.request.ProxyHandler(
{'http': proxy_url, 'https': proxy_url})
opener = urllib.request.build_opener(proxy_handler)
urllib.request.install_opener(opener)
result = run()
if result == 200:
g += 1
progressBar()
else:
b += 1
except Exception as e:
print(f"Proxy: {proxy_url} - Error: {str(e)}")