├── README.md └── main.py /README.md: -------------------------------------------------------------------------------- 1 | # Discord-Nitro-Gen-Checker 2 | A simple, advanced and fast Discord Nitro Generator & Checker. 3 | 4 | # Usage 5 | - Its pretty easy. Just launch the file and you'll be met with enough information 6 | 7 | # Required packages 8 | - Colorama: `pip install colorama` 9 | - Requests: `pip install requests` 10 | 11 | # Disclaimer 12 | - This application is simple, it tries generating random codes, and then it checks the status code of the website. 13 | - Example: discord.gg/yourmom 14 | - And with all honesty it could take forever to generate a valid Nitro code, but hey, nobody is stopping you from trying. 15 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import asyncio, requests, string, random, os, threading, sys, winsound 2 | from colorama import init, Fore 3 | init() 4 | 5 | def error(text): 6 | print(f"{Fore.RED}[!] {text}{Fore.RESET}") 7 | 8 | def valid(code): 9 | print(f"{Fore.GREEN}[!] Found a valid code: {code} | discord.gift/{code} {Fore.RESET}") 10 | with open("valid_codes.txt", "a") as f: 11 | f.write(f"discord.gg/{code} | {code}\n") 12 | 13 | def invalid(code): 14 | print(f"{Fore.RED}[!] Found an invalid code: {code} | discord.gift/{code} {Fore.RESET}") 15 | with open("invalid_codes.txt", "a") as f: 16 | f.write(f"discord.gg/{code} | {code}\n") 17 | 18 | def valid_int(text): 19 | while True: 20 | to_generate = input(text) 21 | try: 22 | int(to_generate) 23 | except: 24 | error("Numbers are accepted only.") 25 | else: 26 | return int(to_generate) 27 | 28 | def do_request(the_list, times): 29 | for i in range(int(times)): 30 | code = create_codes(the_list) 31 | the_list.append(code) 32 | response = requests.get(f"https://discord.com/api/v9/entitlements/gift-codes/{code}?with_application=false&with_subscription_plan=true") 33 | if response.status_code == 200: 34 | valid(code) 35 | else: 36 | invalid(code) 37 | 38 | threads = [] 39 | 40 | def thread_do_request(threads_times, times, the_list): 41 | # I. Am. Speed. 42 | better_times = int(round(times/threads_times)) 43 | for i in range(int(threads_times)): 44 | t = threading.Thread(target = do_request, args = [the_list,better_times]) 45 | t.daemon = True 46 | threads.append(t) 47 | for i in range(int(threads_times)): 48 | threads[i].start() 49 | for i in range(int(threads_times)): 50 | threads[i].join() 51 | 52 | def run_until_find(): 53 | the_list = [] 54 | while True: 55 | try: 56 | code = create_codes(the_list) 57 | the_list.append(code) 58 | response = requests.get(f"https://discord.com/api/v9/entitlements/gift-codes/{code}?with_application=false&with_subscription_plan=true") 59 | if response.status_code == 200: 60 | valid(code) 61 | return 62 | except: 63 | break 64 | 65 | async def main(): 66 | made = [] 67 | if os.name == 'nt': # CLS clears the screen, here we check if the OS is windows and then execute the command, CLS works on windows only. 68 | os.system('cls') 69 | print("""███╗ ██╗██╗████████╗██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗███████╗ 70 | ████╗ ██║██║╚══██╔══╝██╔══██╗██╔═══██╗ ██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔════╝ 71 | ██╔██╗ ██║██║ ██║ ██████╔╝██║ ██║ ██║ ██║ ██║██║ ██║█████╗ ███████╗ 72 | ██║╚██╗██║██║ ██║ ██╔══██╗██║ ██║ ██║ ██║ ██║██║ ██║██╔══╝ ╚════██║ 73 | ██║ ╚████║██║ ██║ ██║ ██║╚██████╔╝ ╚██████╗╚██████╔╝██████╔╝███████╗███████║ 74 | ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝ 75 | 76 | ██████╗ ███████╗███╗ ██╗ 77 | ██╔════╝ ██╔════╝████╗ ██║ 78 | ██║ ███╗█████╗ ██╔██╗ ██║ 79 | ██║ ██║██╔══╝ ██║╚██╗██║ 80 | ╚██████╔╝███████╗██║ ╚████║ 81 | ╚═════╝ ╚══════╝╚═╝ ╚═══╝ 82 | 83 | ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗███████╗██████╗ 84 | ██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝██╔════╝██╔══██╗ 85 | ██║ ███████║█████╗ ██║ █████╔╝ █████╗ ██████╔╝ 86 | ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗ 87 | ╚██████╗██║ ██║███████╗╚██████╗██║ ██╗███████╗██║ ██║ 88 | ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ 89 | """) 90 | print(f"{Fore.MAGENTA}[!] Finding a valid Nitro code is almost impossible. This tool just creates codes and checks if they were valid or not.") 91 | print(f"{Fore.CYAN}Github: https://github.com/Sxvxgee{Fore.RESET}") 92 | print(f"""{Fore.CYAN}[1] Automatic valid code finder. 93 | [2] Custom valid code finder.{Fore.RESET}""") 94 | chosen_mode = valid_int("> ") 95 | if int(chosen_mode) == 1: 96 | print(f"{Fore.MAGENTA}[!] Attempting to find a valid code...\n[!] You'll hear a beep sound once a valid code is found.{Fore.RESET}") 97 | thread_run_until_find() 98 | winsound.PlaySound("SystemExclamation", winsound.SND_ALIAS) 99 | else: 100 | times = valid_int("How many codes would you like to generate? ") 101 | if times >= 10: 102 | max_threads = int(round(times/2)) 103 | while True: 104 | threads_ = valid_int(f"How many threads would you like to use? [Speeds up the generation, Max {max_threads}] ") 105 | if threads_ > max_threads: 106 | error(f"Max threads is {max_threads} only.") 107 | else: 108 | break 109 | else: 110 | threads_ = 1 111 | if times >= 50: 112 | print(f'''{Fore.CYAN}[!] The terminal will most likely become messed up & hard to read. 113 | [!] You can know if you got any valid Nitro code by checking if a file named "valid.txt" was created.{Fore.RESET}''') 114 | await asyncio.sleep(3) 115 | print(f"{Fore.MAGENTA}[!] Generating codes...{Fore.RESET}") 116 | thread_do_request(threads_, times, made) 117 | print(f"\n\n{Fore.GREEN}[!] Finished generating codes.{Fore.RESET}") 118 | winsound.PlaySound("SystemExclamation", winsound.SND_ALIAS) 119 | 120 | 121 | 122 | if __name__ == '__main__': 123 | asyncio.run(main()) 124 | input("Press Enter to close.") 125 | sys.exit() 126 | --------------------------------------------------------------------------------