This is discord nitro code generator and checker made with python. This will generate nitro codes and checks if the code is valid or not. If code is valid then it will print the code leaving 2 lines and if not then it will print '*'.
I made the code automatic and made it so it doesn't spam the console. It only sends a message in the console when it starts for the first time, and when a nitro code that works gets generated. Here are my changes, feel free to use, or ignore. The chances of getting a discord nitro out of this is low, but at least with how I updated the code it'll be faster.
I removed most of the print functions, that way the while loop doesn't spam the console lol, otherwise I would have kept them in.
importrequestsimportrandomimportstringwhileTrue:
num=10withopen("Nitro Codes.txt", "w", encoding='utf-8') asfile:
foriinrange(num):
code="".join(random.choices(
string.ascii_uppercase+string.digits+string.ascii_lowercase,
k=16
))
file.write(f"https://discord.gift/{code}\n")
withopen("Nitro Codes.txt") asfile:
forlineinfile.readlines():
nitro=line.strip("\n")
url=f"https://discordapp.com/api/v9/entitlements/gift-codes/{nitro}?with_application=false&with_subscription_plan=true"r=requests.get(url)
ifr.status_code==200:
print(f"\n\n Valid | {nitro}\n\n") #If the nitro code will be valid, it will print the code