Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
TheCaduceus
GitHub Repository: TheCaduceus/WARP-UNLIMITED-ADVANCED
Path: blob/main/warp.py
633 views
1
from datetime import datetime
2
from json import dumps
3
from random import choice, randint
4
from string import ascii_letters, digits
5
from time import sleep
6
import httpx
7
8
WARP_CLIENT_ID = input("Enter your WARP Client ID:\n")
9
10
# Defaults
11
SUCCESS_COUNT, FAIL_COUNT = 0, 0
12
13
def genString(stringLength):
14
try:
15
letters = ascii_letters + digits
16
return ''.join(choice(letters) for _ in range(stringLength))
17
except Exception as error_code:
18
print(error_code)
19
20
def digitString(stringLength):
21
try:
22
digit = digits
23
return ''.join(choice(digit) for _ in range(stringLength))
24
except Exception as error_code:
25
print(error_code)
26
27
url = f"https://api.cloudflareclient.com/v0a{digitString(3)}/reg"
28
29
while True:
30
try:
31
install_id = genString(22)
32
body = {
33
"key": f"{genString(43)}=",
34
"install_id": install_id,
35
"fcm_token": f"{install_id}:APA91b{genString(134)}",
36
"referrer": WARP_CLIENT_ID,
37
"warp_enabled": False,
38
"tos": f"{datetime.now().isoformat()[:-3]}+02:00",
39
"type": "Android",
40
"locale": "es_ES"
41
}
42
data = dumps(body).encode("utf8")
43
headers = {
44
"Content-Type": "application/json; charset=UTF-8",
45
"Host": "api.cloudflareclient.com",
46
"Connection": "Keep-Alive",
47
"Accept-Encoding": "gzip",
48
"User-Agent": "okhttp/3.12.1"
49
}
50
response = httpx.post(url, data=data, headers=headers).status_code
51
except Exception as error_code:
52
print(error_code)
53
54
if response == 200:
55
SUCCESS_COUNT += 1
56
print(f"PASSED: +1GB (total: {SUCCESS_COUNT}GB, failed: {FAIL_COUNT})")
57
else:
58
print(f"FAILED: {response}")
59
FAIL_COUNT += 1
60
61
# Cooldown
62
cooldown_time = randint(30,50)
63
print(f"Sleep: {cooldown_time} seconds.")
64
sleep(cooldown_time)
65
66