-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
61 lines (53 loc) · 1.51 KB
/
main.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
import requests
import time
# Function to get the token
def get_token():
url = "https://api.gx.me/profile/token"
headers = {
'accept':
'application/json',
'accept-language':
'de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7',
'authority':
'api.gx.me',
'cookie':
'SESSION_TYPE=user; SESSION=NzFjMjg3NDAtMDhkOC00ODkwLWJhNzEtODA0YTcwMjNiM2U0',
'origin':
'https://www.opera.com',
'referer':
'https://www.opera.com/',
'sec-ch-ua':
'"Not A(Brand";v="99", "Opera GX";v="107", "Chromium";v="121"',
'sec-ch-ua-mobile':
'?0',
'sec-ch-ua-platform':
'"Windows"',
'sec-fetch-dest':
'empty',
'sec-fetch-mode':
'cors',
'sec-fetch-site':
'cross-site',
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0',
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
return data['data']
else:
print("Failed to retrieve token")
return None
def main():
while True: # Run indefinitely
token = get_token()
if token:
new_url = f"https://discord.com/billing/partner-promotions/1180231712274387115/{token}"
print(new_url)
# Save to a text file
with open("token_url.txt", "a") as file:
file.write(new_url + "\n")
# Wait for 0.5 seconds before the next iteration
time.sleep(0.5)
if __name__ == "__main__":
main()