Forums > Javascript >

[TUT] Nitro generator


Posts: 757

Threads: 58

Joined: Feb, 2021

Reputation: 3

Posted

Okay so I will teach you guys how to make a nitro generator I know this says javascript, but it is in python

So go ahead create a project in python

And paste this I dont really feel like explaining

Run project okay you got nitro nice

from discord_webhook import DiscordWebhook
import requests
import random
import string
import time
import os

class NitroGen: # Initialise the class
def __init__(self): # The initaliseaiton function
self.fileName = "Codes.txt" # Set the file name the codes are stored in

def main(self): # The main function contains the most important code
os.system('cls' if os.name == 'nt' else 'clear') # Clear the screen

print("""thisnamenotgone is cool
""") # Print the title card
time.sleep(2) # Wait a few seconds
self.slowType("Made by: thisnamenotgone posted by timegoesbyfast", .02) # Print who developed the code
time.sleep(1) # Wait a little more
self.slowType("\nInput How Many Codes to Generate and Check: ", .02, newLine = False) # Print the first question

num = int(input('')) # Ask the user for the amount of codes

# Get the webhook url, if the user does not wish to use a webhook the message will be an empty string
self.slowType("\n Press enter you newb", .02, newLine = False)
url = input('') # Get the awnser
webhook = url if url != "" else None # If the url is empty make it be None insted

print() # Print a newline for looks

valid = [] # Keep track of valid codes
invalid = 0 # Keep track of how many invalid codes was detected

for i in range(num): # Loop over the amount of codes to check
code = "".join(random.choices( # Generate the id for the gift
string.ascii_uppercase + string.digits + string.ascii_lowercase,
k = 16
))
url = f"https://discord.gift/{code}" # Generate the url

result = self.quickChecker(url, webhook) # Check the codes

if result: # If the code was valid
valid.append(url) # Add that code to the list of found codes
else: # If the code was not valid
invalid += 1 # Increase the invalid counter by one

if result and webhook is None: # If the code was found and the webhook is not setup
break # End the script


print(f"""
Results:
Valid: {len(valid)}
Invalid: {invalid}
Valid Codes: {', '.join(valid )}""") # Give a report of the results of the check

input("\nThe end! Press Enter 5 times to close the program.") # Tell the user the program finished
[input(i) for i in range(4,0,-1)] # Wait for 4 enter presses


def slowType(self, text, speed, newLine = True): # Function used to print text a little more fancier
for i in text: # Loop over the message
print(i, end = "", flush = True) # Print the one charecter, flush is used to force python to print the char
time.sleep(speed) # Sleep a little before the next one
if newLine: # Check if the newLine argument is set to True
print() # Print a final newline to make it act more like a normal print statement

def generator(self, amount): # Function used to generate and store nitro codes in a seperate file
with open(self.fileName, "w", encoding="utf-8") as file: # Load up the file in write mode
print("Wait, Generating for you") # Let the user know the code is generating the codes

start = time.time() # Note the initaliseation time

for i in range(amount): # Loop the amount of codes to generate
code = "".join(random.choices(
string.ascii_uppercase + string.digits + string.ascii_lowercase,
k = 16
)) # Generate the code id

file.write(f"https://discord.gift/{code}\n") # Write the code

# Tell the user its done generating and how long tome it took
print(f"Genned {amount} codes | Time taken: {round(time.time() - start, 5)}s\n") #

def fileChecker(self, notify = None): # Function used to check nitro codes from a file
valid = [] # A list of the valid codes
invalid = 0 # The amount of invalid codes detected
with open(self.fileName, "r", encoding="utf-8") as file: # Open the file containing the nitro codes
for line in file.readlines(): # Loop over each line in the file
nitro = line.strip("\n") # Remove the newline at the end of the nitro code

# Create the requests url for later use
url = f"https://discordapp.com/api/v6/entitlements/gift-codes/{nitro}?with_application=false&with_subscription_plan=true"

response = requests.get(url) # Get the responce from the url

if response.status_code == 200: # If the responce went through
print(f" Valid | {nitro} ") # Notify the user the code was valid
valid.append(nitro) # Append the nitro code the the list of valid codes

if notify is not None: # If a webhook has been added
DiscordWebhook( # Send the message to discord letting the user know there has been a valid nitro code
url = notify,
content = f"Valid Nito Code detected! @everyone \n{nitro}"
).execute()
else: # If there has not been a discord webhook setup just stop the code
break # Stop the loop since a valid code was found

else: # If the responce got ignored or is invalid ( such as a 404 or 405 )
print(f" Invalid | {nitro} ") # Tell the user it tested a code and it was invalid
invalid += 1 # Increase the invalid counter by one

return {"valid" : valid, "invalid" : invalid} # Return a report of the results

def quickChecker(self, nitro, notify = None): # Used to check a single code at a time
# Generate the request url
url = f"https://discordapp.com/api/v6/entitlements/gift-codes/{nitro}?with_application=false&with_subscription_plan=true"
response = requests.get(url) # Get the response from discord

if response.status_code == 200: # If the responce went through
print(f" Valid | {nitro} ") # Notify the user the code was valid

if notify is not None: # If a webhook has been added
DiscordWebhook( # Send the message to discord letting the user know there has been a valid nitro code
url = notify,
content = f"Valid Nito Code detected! @everyone \n{nitro}"
).execute()

return True # Tell the main function the code was found

else: # If the responce got ignored or is invalid ( such as a 404 or 405 )
print(f" Invalid | {nitro} ") # Tell the user it tested a code and it was invalid
return False # Tell the main function there was not a code found

if __name__ == '__main__':
Gen = NitroGen() # Create the nitro generator object
Gen.main() # Run the main code

no

Error: The signature must be between 3-200 characters

Unidentified

nobody do wut i do

Posts: 401

Threads: 11

Joined: Feb, 2021

Reputation: 2

Replied

Getting a Working Nitro Code is very rare. 

Learning C++, C#, JavaScript Developer

I develop random stuff

Discord: Unidentified#1091

Posts: 757

Threads: 58

Joined: Feb, 2021

Reputation: 3

Replied

@Unidentified

Let me tell you something

if you put in 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

And wait then you will get a valid one

no

Error: The signature must be between 3-200 characters

Shade_0122

Loli Protagonist

Posts: 1481

Threads: 99

Joined: Jun, 2020

Reputation: 19

Replied

He is right there is multiple combinations of ids for nitro but I feel it's not that easy, anyone could do it and farm it for months with endless codes I'm pretty sure it's like any gift card, if u dont buy it and scratch off the code and use it wont work cause of things if u buy it and use it will work, I'm sure its the same with nitro. You cant just generate random ones discord must have something in place to prevent it,  say:

123 hasn't been taken but nitro hasn't been bought if some uses that it will say not purchased but if someone days buy and its 123 and uses it its successful 

 

I suck at explaining but all I'm saying is it works most likely like any gift card u find in a shop

My non skidded siggy

thisnamenotgone

funtimes is daddy

Posts: 480

Threads: 29

Joined: Jan, 2021

Reputation: 3

Replied

yo that is mine :cri:

idc

Posts: 757

Threads: 58

Joined: Feb, 2021

Reputation: 3

Replied

@Shade_0122

huhuhuhu

no

Error: The signature must be between 3-200 characters

thisnamenotgone

funtimes is daddy

Posts: 480

Threads: 29

Joined: Jan, 2021

Reputation: 3

Replied

https://repl.it/join/vvqylarm-iloveyoualot here if ya wanna help 

Wabz

Winning.js

Posts: 2535

Threads: 193

Joined: Apr, 2020

Reputation: 24

Replied

are you kidding me

1. that's just copy paste

2. tabbing messed up lol

My new discord is Wabz#1337 with ID 777154062789509130

Vegie

Bogie

Posts: 132

Threads: 19

Joined: Apr, 2020

Reputation: 11

Replied

ur acc will be flagged and banned before you get a code and the chances of getting one isn't worth it u could just leave a btc miner on and it will get u nitro faster then leaving this on

i hab wetawd

AIpha

alpha

Posts: 175

Threads: 23

Joined: May, 2018

Reputation: 4

Replied

This is nothing more than a random string generator and checker. I wouldn't label it a nitro generator either considering getting a working nitro link would be very rare using this method. Your better off just using a nitro sniper.

Was on WRD front page

Programs I own - Synapse X, Protosmasher, Sirhurt, Sweat Heart of Sigma Chi, Scriptware V2

Languages I know - C#,JS,Lua,VB.net
Learning - Python, C

Posts: 757

Threads: 58

Joined: Feb, 2021

Reputation: 3

Replied

@AIpha

I know

I am not dumb I just posted it because it was cool

no

Error: The signature must be between 3-200 characters

Posts: 1924

Threads: 128

Joined: Feb, 2020

Reputation: 13

Replied

this is not a tutorial, this is just a spoonfeed

H3x0R#4231 (GitHub, Script Repobtw light mode sucks
Reverse Engineer and Lego Hacker

Languages: Lua, C#, C++

If you DM me, make it worth my time. Ask your question straightforwardly.

Posts: 757

Threads: 58

Joined: Feb, 2021

Reputation: 3

Replied

@OpenGamerTips

:/

/chars

no

Error: The signature must be between 3-200 characters