├── README.md
├── logo_ngnc.png
├── main.py
└── requirements.txt
/README.md:
--------------------------------------------------------------------------------
1 | # Nitro Generator N Checker (NGNC)
2 | A powerful script that generates nitro codes for Discord and checks if they work
3 |
4 | 
5 | 
6 |
7 | 
8 | # How to run
9 |
10 | Windows
11 | ```py
12 | cd your_directory
13 |
14 | pip install -r requirements.txt
15 |
16 | Run the NGNC.exe
17 | ```
18 |
19 | Linux
20 | ```py
21 | cd your_directory
22 |
23 | pip3 install -r requirements.txt
24 |
25 | chmod +x NGNC
26 |
27 | ./NGNC
28 | ```
29 |
30 | **WORKS ONLY WITH PYTHON 3.5 AND ABOVE**
31 |
32 | # Showcase
33 |
34 | [](https://streamable.com/skryeq "Showcase")
35 |
36 | ## Modules used
37 |
38 | >- os
39 | >- requests
40 | >- random
41 | >- sys
42 | >- string
43 | >- time
44 | >- colorama
45 | >- psutil
46 | >- threading
47 | >- pypresence
48 | >- beautifulsoup4 (AKA bs4)
49 | >- datetime
50 | >- webbrowser
51 | >- platform
52 | >- discord-webhook
53 | >- lxml
54 |
55 | ### Do you want to contribute?
56 | > Join the [Telegram Group](https://t.me/NGNC2022).
57 |
58 | ### ToS
59 | This is totally against Discord's ToS and Guidelines.
60 |
61 | Use at your own risk!
62 |
63 | I'm not responsible for any account ban - termination!
64 |
--------------------------------------------------------------------------------
/logo_ngnc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/daglaroglou/Nitro-Generator-N-Checker/d734ccd88599c5ef4aa4959cfcd402e3c31b9582/logo_ngnc.png
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | try:
2 | import os
3 | import requests
4 | import random
5 | import sys
6 | import string
7 | import time
8 | import colorama
9 | import psutil
10 | import threading
11 | import platform
12 | import webbrowser
13 | from random import choice
14 | from colorama import Fore
15 | from pypresence import *
16 | from bs4 import BeautifulSoup
17 | from datetime import datetime
18 | from discord_webhook import DiscordWebhook, DiscordEmbed
19 | except ImportError:
20 | os.system('pip install requests colorama psutil datetime bs4 pypresence discord-webhook lxml --break-system-packages')
21 | print('Please re-run the program and install requirements.txt')
22 | input()
23 |
24 | colorama.init()
25 |
26 | valids = 0
27 | invalids = 0
28 | totals = 0
29 | ifrpc = 'no'
30 | ifredeemer = 'no'
31 | ifwh = 'no'
32 |
33 | def clear():
34 | if platform.platform().startswith('Windows') == True:
35 | return os.system('cls')
36 | else:
37 | return os.system('clear')
38 |
39 | def connection():
40 | url = "http://www.google.com"
41 | timeout = 5
42 | try:
43 | requests.get(url, timeout=timeout)
44 | return True
45 | except (requests.ConnectionError, requests.Timeout) as exception:
46 | return False
47 |
48 | if connection() == False:
49 | print(f'{Fore.LIGHTBLACK_EX}[{Fore.RED}!{Fore.LIGHTBLACK_EX}] You need internet connection to run this program!')
50 | time.sleep(5)
51 | exit()
52 |
53 | def webhook_notification(code, time, wh):
54 | webhook = DiscordWebhook(url=wh, username="NGNC")
55 | embed = DiscordEmbed(
56 | title="Nitro found!", description="A valid nitro code was generated", color="00ff00"
57 | )
58 | embed.set_author(
59 | name="NGNC",
60 | url="https://github.com/daglaroglou/Nitro-Generator-N-Checker",
61 | icon_url="https://i.imgur.com/oxLslJQ.png",
62 | )
63 | embed.set_footer(text="Credits: @daglaroglou")
64 | embed.set_timestamp()
65 | embed.add_embed_field(name="Code", value=str(code), inline=False)
66 | embed.add_embed_field(name="Link", value=f"https://discord.gift/{code}", inline=False)
67 | embed.add_embed_field(name="Time", value=time, inline=False)
68 | webhook.add_embed(embed)
69 | webhook.execute()
70 |
71 | def selfupdate():
72 | print(f'{Fore.LIGHTBLACK_EX}[{Fore.RED}#{Fore.LIGHTBLACK_EX}] Checking for updates...')
73 | latest = requests.get("https://api.github.com/repos/daglaroglou/Nitro-Generator-N-Checker/releases/latest")
74 | latest = latest.json()['tag_name']
75 | latest = float(latest)
76 | time.sleep(2)
77 | if latest > 3.0:
78 | print(f'{Fore.LIGHTBLACK_EX}[{Fore.GREEN}${Fore.LIGHTBLACK_EX}] {Fore.GREEN}Good news! {Fore.RESET}NGNC has an update! {Fore.RED}3.0 {Fore.RESET}-> {Fore.GREEN}{latest}{Fore.LIGHTBLACK_EX}\n')
79 | cl = requests.get("https://api.github.com/repos/daglaroglou/Nitro-Generator-N-Checker/releases/latest")
80 | cl = cl.json()['body']
81 | print('\033[1m' + f'Changelog: \n{Fore.RESET}')
82 | print(cl)
83 | time.sleep(3)
84 | print(f'\n{Fore.LIGHTBLACK_EX}[{Fore.YELLOW}?{Fore.LIGHTBLACK_EX}] Do you want to download it? ({Fore.WHITE}yes{Fore.LIGHTBLACK_EX}/{Fore.WHITE}no{Fore.LIGHTBLACK_EX})')
85 | ask = str(input('>>> '))
86 | if ask == 'yes' or ask == 'y' or ask == 'YES' or ask == 'Y':
87 | print(f'{Fore.GREEN}Cool!')
88 | time.sleep(2)
89 | webbrowser.open_new_tab('https://github.com/daglaroglou/Nitro-Generator-N-Checker/releases/latest')
90 | time.sleep(2)
91 | exit()
92 | elif ask == 'no' or ask == 'n' or ask == 'NO' or ask == 'N':
93 | print(f'{Fore.GREEN}Cool!')
94 | time.sleep(2)
95 | clear()
96 | else:
97 | print(f'{Fore.LIGHTBLACK_EX}[{Fore.GREEN}+{Fore.LIGHTBLACK_EX}] You are up to date! Starting...')
98 | time.sleep(3)
99 | clear()
100 | selfupdate()
101 |
102 | def logacc(var):
103 | try:
104 | print(f'{Fore.LIGHTBLUE_EX}Attempting to log in...')
105 | accinfo = requests.get("https://discordapp.com/api/v9/users/@me", headers={"content-type": "application/json", "authorization": var}).json()
106 | accname = accinfo['username']
107 | acctag = accinfo['discriminator']
108 | print(f'{Fore.GREEN}Logged in as {accname}#{acctag}')
109 | time.sleep(2)
110 | except:
111 | print(f'{Fore.RED}Failed to log in, skipping Instant Redeemer...')
112 | ifredeemer = 'no'
113 | time.sleep(2)
114 | return ifredeemer
115 |
116 | def proxy_generator():
117 | response = requests.get("https://sslproxies.org/") or requests.get('https://free-proxy-list.net/')
118 | soup = BeautifulSoup(response.content, 'lxml')
119 | proxy = {'https': choice(list(map(lambda x:x[0]+':'+x[1], list(zip(map(lambda x:x.text, soup.findAll('td')[::8]), map(lambda x:x.text, soup.findAll('td')[1::8]))))))}
120 | return proxy
121 |
122 | def data_scraper(request_method, url, **kwargs):
123 | while True:
124 | try:
125 | proxy = proxy_generator()
126 | response = requests.request(request_method, url, proxies=proxy, timeout=10, **kwargs)
127 | break
128 | except:
129 | now = datetime.now()
130 | current_time = now.strftime("%H:%M:%S")
131 | print(f"{Fore.LIGHTBLACK_EX}{current_time} - Dead proxy, fetching a new one...")
132 | pass
133 | return response
134 |
135 | def process_exists(processName):
136 | for proc in psutil.process_iter():
137 | try:
138 | if processName.lower() in proc.name().lower():
139 | return True
140 | except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess):
141 | pass
142 | return False;
143 |
144 | client_id = '926434489054400522'
145 | if platform.platform().startswith('Linux'):
146 | if process_exists('Discord') or process_exists('DiscordPTB') or process_exists('DiscordCanary') == True:
147 | RPC = Presence(client_id, pipe=0)
148 | RPC.connect()
149 | else:
150 | ifrpc = 'no'
151 | elif platform.platform().startswith('Windows'):
152 | if process_exists('Discord.exe') or process_exists('DiscordPTB.exe') or process_exists('DiscordCanary.exe') == True:
153 | RPC = Presence(client_id, pipe=0)
154 | RPC.connect()
155 | else:
156 | ifrpc = 'no'
157 | else:
158 | ifrpc = 'no'
159 | time.sleep(2)
160 |
161 | def rpc():
162 | start_time = time.time()
163 | while True:
164 | global totals
165 | global valids
166 | global invalids
167 | cpu_per = round(psutil.cpu_percent(),1)
168 | mem_per = round(psutil.virtual_memory().percent, 1)
169 | opsys = platform.platform()
170 | if opsys.startswith('Linux'):
171 | opsys = 'Linux'
172 | else:
173 | opsys = 'Windows'
174 | arch = platform.architecture()[0]
175 | RPC.update(start=start_time, details=f"Invalid: {invalids}, Valid: {valids}", state="CPU: "+str(cpu_per)+"%, RAM: "+str(mem_per)+"%", large_text=f'{opsys}, {arch}' ,large_image="https://3.bp.blogspot.com/-TFOwcFJKD2M/XB6bLZZFvoI/AAAAAAAAArQ/NedhZKh9r38rN3PwyJtfu9MBY5EsNXZCgCEwYBhgL/s200/discordbadge.gif", buttons=[{"label": "GitHub", "url": "https://github.com/daglaroglou/Nitro-Generator-N-Checker"}, {"label": "Download", "url": "https://github.com/daglaroglou/Nitro-Generator-N-Checker/releases/latest"}])
176 | time.sleep(1)
177 |
178 | def typingPrint(text):
179 | for character in text:
180 | sys.stdout.write(character)
181 | sys.stdout.flush()
182 | time.sleep(0.05)
183 |
184 | def typingInput(text):
185 | for character in text:
186 | sys.stdout.write(character)
187 | sys.stdout.flush()
188 | time.sleep(0.05)
189 | value = input()
190 | return value
191 |
192 | def askforwebhook():
193 | print(f'{Fore.LIGHTBLACK_EX}[{Fore.YELLOW}?{Fore.LIGHTBLACK_EX}] Do you want Webhook notifications?: ({Fore.WHITE}yes{Fore.LIGHTBLACK_EX}/{Fore.WHITE}no{Fore.LIGHTBLACK_EX})\n>>> ', end='')
194 | time.sleep(0.5)
195 | global ifwh
196 | ifwh = str(input())
197 | print(f'{Fore.GREEN}Cool!')
198 | time.sleep(1)
199 | return ifwh
200 |
201 | def askforrpc():
202 | print(f'{Fore.LIGHTBLACK_EX}[{Fore.YELLOW}?{Fore.LIGHTBLACK_EX}] Do you want Discord RPC?: ({Fore.WHITE}yes{Fore.LIGHTBLACK_EX}/{Fore.WHITE}no{Fore.LIGHTBLACK_EX})\n>>> ', end='')
203 | time.sleep(0.5)
204 | global ifrpc
205 | ifrpc = str(input())
206 | print(f'{Fore.GREEN}Cool!')
207 | time.sleep(1)
208 | return ifrpc
209 | if platform.platform().startswith('Windows') and process_exists('Discord.exe') or process_exists('DiscordPTB.exe') or process_exists('DiscordCanary.exe'):
210 | askforrpc()
211 | elif platform.platform().startswith('Linux') and process_exists('Discord') or process_exists('DiscordPTB') or process_exists('DiscordCanary'):
212 | askforrpc()
213 | else:
214 | print(f'{Fore.RED}Discord is not running, skipping RPC...')
215 | clear()
216 | ifrpc = 'no'
217 | time.sleep(2)
218 |
219 | def redeemer(var, nitrocode):
220 | json = {
221 | 'channel_id': None,
222 | 'payment_source_id': None
223 | }
224 | requests.post("https://discordapp.com/api/v9/entitlements/gift-codes/"+nitrocode+"/redeem", headers={"Content-Type": "application/json", "authorization": var, 'Accept': 'application/json'}, json=json)
225 |
226 | def askforredeemer():
227 | print(f'{Fore.LIGHTBLACK_EX}[{Fore.YELLOW}?{Fore.LIGHTBLACK_EX}] Do you want Instant Redeemer: ({Fore.WHITE}yes{Fore.LIGHTBLACK_EX}/{Fore.WHITE}no{Fore.LIGHTBLACK_EX})\n>>> ', end='')
228 | time.sleep(0.5)
229 | ifredeemer = str(input())
230 | print(f'{Fore.GREEN}Cool!')
231 | time.sleep(1)
232 | return ifredeemer
233 |
234 | aggrees = ['yes', 'y', 'Y', 'YES']
235 | if askforredeemer() in aggrees:
236 | token2 = input(f'{Fore.YELLOW}Input account token: ')
237 | token2 = str(token2)
238 | logacc(token2)
239 |
240 | if askforwebhook() in aggrees:
241 | wh = input(f'{Fore.YELLOW}Input webhook link: ')
242 | wh = str(wh)
243 |
244 | def main():
245 | global valids
246 | global invalids
247 | global totals
248 | global ifrpc
249 | global ifredeemer
250 | global num
251 | clear()
252 | print(f"""{Fore.LIGHTBLUE_EX}
253 | .~!!!!!!!!!!!!!!!!!!!!!~~^:.
254 | .!77777777777777777777777777!^.
255 | ......:!777777????????7777777~.
256 | ^777?J?77777777?J?777777^
257 | .??! ^!!!!!!!!!!!77JJ!!?{Fore.LIGHTBLACK_EX}PB###BG5{Fore.LIGHTBLUE_EX}?!7JJ77777~ 888b 888 .d8888b. 888b 888 .d8888b.
258 | .^~: ::::::::^!77?Y?^Y{Fore.LIGHTBLACK_EX}#@#####&{Fore.LIGHTBLUE_EX}J^JJ77777~ 8888b 888 d88P Y88b 8888b 888 d88P Y88b
259 | ^77J?:G{Fore.LIGHTBLACK_EX}@GGGGGGGB&&@{Fore.LIGHTBLUE_EX}5:JJ77777. 88888b 888 888 888 88888b 888 888 888
260 | .^~^^~77?Y~?{Fore.LIGHTBLACK_EX}@GGGGGGGGGB&&&{Fore.LIGHTBLUE_EX}~!Y?7777^ 888Y88b 888 888 888Y88b 888 888
261 | .~~!7777?Y~?{Fore.LIGHTBLACK_EX}@GGGGGGGGGB&&{Fore.LIGHTBLUE_EX}@~!Y?7777^ 888 Y88b888 888 88888 888 Y88b888 888
262 | :77777J?:G{Fore.LIGHTBLACK_EX}@GGGGGGGB&&@{Fore.LIGHTBLUE_EX}5:JJ77777. 888 Y88888 888 888 888 Y88888 888 888
263 | !7777?Y?^5{Fore.LIGHTBLACK_EX}&@#####&{Fore.LIGHTBLUE_EX}J^JJ77777~ 888 Y8888 Y88b d88P 888 Y8888 Y88b d88P
264 | .!77777JJ!!{Fore.LIGHTBLACK_EX}JPB####B5{Fore.LIGHTBLUE_EX}?!7JJ77777~ 888 Y888 "Y8888P88 888 Y888 "Y8888P"
265 | .~777777JJ?77777777?J?777777^ {Fore.LIGHTBLACK_EX}Coded by: {Fore.GREEN
266 | }daglaroglou{Fore.LIGHTBLACK_EX} | Licenced under: {Fore.GREEN}MIT Licence{Fore.LIGHTBLUE_EX}
267 | :!7777777????????7777777~.
268 | :^!7777777777777777!^.
269 | .:^~!!!!!!!!~^:.
270 | """)
271 | time.sleep(2)
272 | typingPrint(f'Welcome back {os.getlogin()},\n')
273 | time.sleep(0.3)
274 | typingPrint(f'{Fore.YELLOW}Input how many codes you wanna generate: ')
275 | print('\n>>> ', end='')
276 | num = int(input())
277 |
278 | with open("Nitro Codes.txt", "w", encoding='utf-8') as file:
279 | typingPrint(f"{Fore.YELLOW}Your nitro codes are being generated, please be patient if you entered high number!\n")
280 |
281 | start = time.time()
282 |
283 | for i in range(num):
284 | code = "".join(random.choices(
285 | string.ascii_uppercase + string.digits + string.ascii_lowercase,
286 | k = 16
287 | ))
288 |
289 | file.write(f"https://discord.gift/{code}\n")
290 |
291 | print(f"{Fore.YELLOW}Generated {num} codes | Time taken: {round(time.time() - start, 2)}s\n")
292 |
293 | with open("Nitro Codes.txt") as file:
294 | for line in file.readlines():
295 | nitro = line.strip("\n")
296 |
297 | url = "https://discordapp.com/api/v9/entitlements/gift-codes/" + nitro + "?with_application=false&with_subscription_plan=true"
298 |
299 | r = data_scraper('http', url)
300 |
301 | if r == '':
302 | num-=1
303 | now = datetime.now()
304 | current_time = now.strftime("%H:%M:%S")
305 | print(f"{Fore.GREEN}{current_time} - [ VALID ] | {nitro} {Fore.YELLOW}(Left: {num})\n")
306 | valids+=1
307 | totals+=1
308 | if ifwh == 'yes':
309 | webhook_notification(nitro, current_time)
310 | if ifredeemer == 'yes':
311 | redeemer(token2, nitro)
312 | vf = open('Valid Codes.txt', 'w')
313 | vf.write(f'https://discord.gift/{nitro}'+'\n')
314 | vf.close()
315 | elif r == '':
316 | now = datetime.now()
317 | current_time = now.strftime("%H:%M:%S")
318 | print(f"{Fore.YELLOW}{current_time} - [ RATE LIMIT ] | {nitro} {Fore.YELLOW}(Left: {num})\n")
319 | valids+=1
320 | totals+=1
321 | time.sleep(1)
322 | else:
323 | num-=1
324 | now = datetime.now()
325 | current_time = now.strftime("%H:%M:%S")
326 | print(f"{Fore.RED}{current_time} - [ INVALID ] | {nitro} {Fore.YELLOW}(Left: {num})")
327 | invalids+=1
328 | totals+=1
329 | time.sleep(0.5)
330 | time.sleep(2)
331 | print(f'{Fore.LIGHTBLACK_EX}\nResults:')
332 | time.sleep(0.5)
333 | print(f'{Fore.LIGHTBLACK_EX} Valid: {Fore.GREEN}{valids}')
334 | time.sleep(0.5)
335 | print(f'{Fore.LIGHTBLACK_EX} Invalid: {Fore.RED}{invalids}')
336 | time.sleep(0.5)
337 | print(f'{Fore.LIGHTBLACK_EX} Total: {Fore.WHITE}{totals}')
338 | time.sleep(0.4)
339 | input(f"\n{Fore.LIGHTBLACK_EX}You have generated, now press the {Fore.RED}[X] {Fore.LIGHTBLACK_EX}to close this, you'll get valid codes in Valid Codes.txt if you see its empty then you got no luck, generate 20 million codes for luck or else.")
340 |
341 | if ifrpc == 'yes' or ifrpc == 'y' or ifrpc == 'Y' or ifrpc == 'YES':
342 | t1=threading.Thread(target=rpc)
343 | t2=threading.Thread(target=main)
344 | t1.start()
345 | t2.start()
346 | elif ifrpc == 'no' or ifrpc == 'n' or ifrpc == 'N' or ifrpc == 'NO':
347 | t2=threading.Thread(target=main)
348 | t2.start()
349 | else:
350 | print(f'{Fore.RED}Please elect between {Fore.GREEN}yes {Fore.RED}and {Fore.GREEN}no{Fore.RED}!')
351 | time.sleep(1)
352 | exit()
353 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | requests
2 | colorama
3 | psutil
4 | datetime
5 | bs4
6 | pypresence
7 | discord-webhook
8 | lxml
9 |
--------------------------------------------------------------------------------