-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdng_python_edition.py
More file actions
180 lines (134 loc) · 8.11 KB
/
dng_python_edition.py
File metadata and controls
180 lines (134 loc) · 8.11 KB
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
169
170
171
172
173
174
175
176
177
178
179
180
#Hello Developer please if you want support me you can follow me on instgram and YouTube (G.L Aria)
import os
import random
import string
import time
import ctypes
try:
from discord_webhook import DiscordWebhook
except ImportError:
input(f"Module discord_webhook not installed, to install run '{'py -3' if os.name == 'nt' else 'python3.8'} -m pip install discord_webhook'\nPress enter to exit")
exit()
try:
import requests
except ImportError:
input(f"Module requests not installed, to install run '{'py -3' if os.name == 'nt' else 'python3.8'} -m pip install requests'\nPress enter to exit")
#Base Nitro Generator :D
class NitroGen:
def __init__(self):
self.fileName = "Nitro Codes.txt"
def main(self):
os.system('cls' if os.name == 'nt' else 'clear')
if os.name == "nt":
print("")
ctypes.windll.kernel32.SetConsoleTitleW("Nitro Generator and Checker - Made by G.L Aria")
else:
print(f'\33]0;Nitro Generator and Checker - Made by G.L Aria\a', end='', flush=True)
print("""\033[31;2;40m
░██████╗░░░░██╗░░░░░ ░█████╗░██████╗░██╗░█████╗░ ███╗░░██╗██╗████████╗██████╗░░█████╗░
██╔════╝░░░░██║░░░░░ ██╔══██╗██╔══██╗██║██╔══██╗ ████╗░██║██║╚══██╔══╝██╔══██╗██╔══██╗
██║░░██╗░░░░██║░░░░░ ███████║██████╔╝██║███████║ ██╔██╗██║██║░░░██║░░░██████╔╝██║░░██║
██║░░╚██╗░░░██║░░░░░ ██╔══██║██╔══██╗██║██╔══██║ ██║╚████║██║░░░██║░░░██╔══██╗██║░░██║
╚██████╔╝██╗███████╗ ██║░░██║██║░░██║██║██║░░██║ ██║░╚███║██║░░░██║░░░██║░░██║╚█████╔╝
░╚═════╝░╚═╝╚══════╝ ╚═╝░░╚═╝╚═╝░░╚═╝╚═╝╚═╝░░╚═╝ ╚═╝░░╚══╝╚═╝░░░╚═╝░░░╚═╝░░╚═╝░╚════╝░
░██████╗░███████╗███╗░░██╗███████╗██████╗░░█████╗░████████╗░█████╗░██████╗░
██╔════╝░██╔════╝████╗░██║██╔════╝██╔══██╗██╔══██╗╚══██╔══╝██╔══██╗██╔══██╗
██║░░██╗░█████╗░░██╔██╗██║█████╗░░██████╔╝███████║░░░██║░░░██║░░██║██████╔╝
██║░░╚██╗██╔══╝░░██║╚████║██╔══╝░░██╔══██╗██╔══██║░░░██║░░░██║░░██║██╔══██╗
╚██████╔╝███████╗██║░╚███║███████╗██║░░██║██║░░██║░░░██║░░░╚█████╔╝██║░░██║
░╚═════╝░╚══════╝╚═╝░░╚══╝╚══════╝╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░░╚════╝░╚═╝░░╚═╝
Please Subscribe My YouTube Channel To Support Me :D""")
time.sleep(2)
self.slowType("Made by G.L Aria", .02)
time.sleep(1)
self.slowType("\nHow Many Codes to Generate and Check: ", .02, newLine = False)
num = int(input(''))
self.slowType("\nPlease Press Enter To Continue: ", .02, newLine = False)
url = input('')
webhook = url if url != "" else None
valid = []
invalid = 0
for i in range(num):
try:
code = "".join(random.choices(
string.ascii_uppercase + string.digits + string.ascii_lowercase,
k = 16
))
url = f"https://discord.gift/{code}"
result = self.quickChecker(url, webhook)
if result:
valid.append(url)
else:
invalid += 1
except Exception as e:
print(f" Error | {url} ")
if os.name == "nt":
ctypes.windll.kernel32.SetConsoleTitleW(f"Nitro Generator and Checker - {len(valid)} Valid | {invalid} Invalid - Made by G.L Aria")
print("")
else:
print(f'\33]0;Nitro Generator and Checker - {len(valid)} Valid | {invalid} Invalid - Made by G.L Aria\a', end='', flush=True)
print(f"""
Here Your Results:
Valid Nitros: {len(valid)}
Invalid Nitros: {invalid}
Valid Nitro Codes: {', '.join(valid )}""")
input("\nThe end! Press Enter 5 times to close the program.")
[input(i) for i in range(4,0,-1)]
def slowType(self, text, speed, newLine = True):
for i in text:
print(i, end = "", flush = True)
time.sleep(speed)
if newLine:
print()
def generator(self, amount):
with open(self.fileName, "w", encoding="utf-8") as file:
print("Wait, Generating for you")
start = time.time()
for i in range(amount):
code = "".join(random.choices(
string.ascii_uppercase + string.digits + string.ascii_lowercase,
k = 16
))
file.write(f"https://discord.gift/{code}\n")
print(f"Genned {amount} codes | Time taken: {round(time.time() - start, 5)}s\n")
def fileChecker(self, notify = None):
valid = []
invalid = 0
with open(self.fileName, "r", encoding="utf-8") as file:
for line in file.readlines():
nitro = line.strip("\n")
url = f"https://discordapp.com/api/v6/entitlements/gift-codes/{nitro}?with_application=false&with_subscription_plan=true"
response = requests.get(url)
if response.status_code == 200:
print(f" Valid | {nitro} ")
valid.append(nitro)
if notify is not None:
DiscordWebhook(
url = notify,
content = f"Valid Nitro Code detected! @everyone \n{nitro}"
).execute()
else:
break
else:
print(f" Invalid | {nitro} ")
invalid += 1
return {"valid" : valid, "invalid" : invalid}
def quickChecker(self, nitro, notify = None):
url = f"https://discordapp.com/api/v6/entitlements/gift-codes/{nitro}?with_application=false&with_subscription_plan=true"
response = requests.get(url)
if response.status_code == 200:
print(f" Valid | {nitro} ", flush=True, end="" if os.name == 'nt' else "\n")
with open("Nitro Codes.txt", "w") as file:
file.write(nitro)
if notify is not None:
DiscordWebhook(
url = notify,
content = f"Valid Nitro Code detected! @everyone \n{nitro}"
).execute()
return True
else:
print(f" Invalid | {nitro} ", flush=True, end="" if os.name == 'nt' else "\n")
return False
if __name__ == '__main__':
Gen = NitroGen()
Gen.main()