-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathNitro.py
35 lines (28 loc) · 1010 Bytes
/
Nitro.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
import random
import string
import requests
def gencode():
letters = string.ascii_letters + string.digits
return ''.join(random.choice(letters) for i in range(19))
class NitroGenerator:
def __init__(self):
self.codes = []
self.check()
def check(self):
while True:
code = gencode()
self.codes.append(code)
response = requests.get(
"https://discord.com/api/v7/entitlements/gift-codes/" + code + "?with_application=false&with_subscription_plan=true")
data = response.json()
if data["message"] == 'Unknown Gift Code':
print("Not worked: " + code)
elif data["message"] == 'You are being rate limited.':
print('Rate Limited: ' + code)
file = open("ratelimited.txt", "a+")
file.write("\n" + code)
else:
print("Worked: " + code)
file = open("workedcodes.txt", "a+")
file.write("\n" + code)
NitroGenerator()