Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo Fixing #68

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ You need to install Python, that can be done [here](https://www.python.org)
2. Install Python packages
```sh
# Windows:
py -3 -m pip install -r requirements.txt
python3 -m pip install -r requirements.txt
or
run install_modules.bat

# Unix
python3.8 -m pip install -r requirements.txt
python3.9 -m pip install -r requirements.txt
```

#### Or this can be done using android with unrooted Termux
Expand Down Expand Up @@ -131,6 +133,7 @@ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR I
## Contact

Logicguy - [@Drillenissen#4268](https://www.discordapp.com) - logicguy.mailandcontact@gmail.com
Also helped Fisheiyy [Fisheiyy.exe#7683](https://www.discordapp.com) - imananimoose@gmail.com

Project Link: [https://github.com/logicguy1/Discord-Nitro-Generator-and-Checker](https://github.com/logicguy1/Discord-Nitro-Generator-and-Checker)

Expand Down
1 change: 1 addition & 0 deletions install_modules.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3 -m pip install -r requirements.txt
40 changes: 20 additions & 20 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LICNECE = """
LICENSE = """
Copyright © 2021 Drillenissen#4268

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Expand All @@ -11,9 +11,9 @@
import time
import os

print(LICNECE)
print(LICENSE)

time.sleep(3)
time.sleep(1.7)
os.system('cls' if os.name == 'nt' else 'clear')

import random
Expand All @@ -23,12 +23,12 @@
try: # Check if the requrements have been installed
from discord_webhook import DiscordWebhook # Try to import discord_webhook
except ImportError: # If it chould not be installed
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") # Tell the user it has not been installed and how to install it
input(f"Module discord_webhook not installed, to install run '{'python3' if os.name == 'nt' else 'python3.9'} -m pip install discord_webhook'\nPress enter to exit") # Tell the user it has not been installed and how to install it
exit() # Exit the program
try: # Setup try statement to catch the error
import requests # Try to import requests
except ImportError: # If it has not been installed
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")# Tell the user it has not been installed and how to install it
input(f"Module requests not installed, to install run '{'python3' if os.name == 'nt' else 'python3.9'} -m pip install requests'\nPress enter to exit")# Tell the user it has not been installed and how to install it
exit() # Exit the program


Expand All @@ -40,9 +40,9 @@ def main(self): # The main function contains the most important code
os.system('cls' if os.name == 'nt' else 'clear') # Clear the screen
if os.name == "nt": # If the system is windows
print("")
ctypes.windll.kernel32.SetConsoleTitleW("Nitro Generator and Checker - Made by Drillenissen#4268") # Change the
ctypes.windll.kernel32.SetConsoleTitleW("Nitro Generator and Checker - Made by Drillenissen#4268 & Benz#8295") # Change the
else: # Or if it is unix
print(f'\33]0;Nitro Generator and Checker - Made by Drillenissen#4268\a', end='', flush=True) # Update title of command prompt
print(f'\33]0;Nitro Generator and Checker - Made by Drillenissen#4268 & Benz#8295\a', end='', flush=True) # Update title of command prompt

print(""" █████╗ ███╗ ██╗ ██████╗ ███╗ ██╗██╗██╗ ██╗
██╔══██╗████╗ ██║██╔═══██╗████╗ ██║██║╚██╗██╔╝
Expand All @@ -51,16 +51,16 @@ def main(self): # The main function contains the most important code
██║ ██║██║ ╚████║╚██████╔╝██║ ╚████║██║██╔╝ ██╗
╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝
""") # Print the title card
time.sleep(2) # Wait a few seconds
self.slowType("Made by: Drillenissen#4268 && Benz#8295", .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
time.sleep(1.3) # Wait a few seconds
self.slowType("Made by: Drillenissen#4268 & Benz#8295", .013) # Print who developed the code
time.sleep(0.75) # Wait a little more

self.slowType("\nInput How Many Codes to Generate and Check: ", .013, 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("\nDo you wish to use a discord webhook? \nIf so type it here or press enter to ignore: ", .02, newLine = False)
url = input('') # Get the awnser
self.slowType("\nDo you want to use a discord webhook? \nType it here or press enter to ignore: ", .01, newLine = False)
url = input('') # Get the answer
webhook = url if url != "" else None # If the url is empty make it be None insted

# print() # Print a newline for looks
Expand All @@ -86,10 +86,10 @@ def main(self): # The main function contains the most important code
print(f" Error | {url} ") # Tell the user an error occurred

if os.name == "nt": # If the system is windows
ctypes.windll.kernel32.SetConsoleTitleW(f"Nitro Generator and Checker - {len(valid)} Valid | {invalid} Invalid - Made by Drillenissen#4268") # Change the title
ctypes.windll.kernel32.SetConsoleTitleW(f"Nitro Generator and Checker - {len(valid)} Valid | {invalid} Invalid - Made by Drillenissen#4268 & Benz#8295") # Change the title
print("")
else: # If it is a unix system
print(f'\33]0;Nitro Generator and Checker - {len(valid)} Valid | {invalid} Invalid - Made by Drillenissen#4268\a', end='', flush=True) # Change the title
print(f'\33]0;Nitro Generator and Checker - {len(valid)} Valid | {invalid} Invalid - Made by Drillenissen#4268 & Benz#8295\a', end='', flush=True) # Change the title

print(f"""
Results:
Expand Down Expand Up @@ -123,7 +123,7 @@ def generator(self, amount): # Function used to generate and store nitro codes i
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") #
print(f"Generated {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
Expand All @@ -133,7 +133,7 @@ def fileChecker(self, notify = None): # Function used to check nitro codes from
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"
url = f"https://discordapp.com/api/v8/entitlements/gift-codes/{nitro}?with_application=false&with_subscription_plan=true"

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

Expand All @@ -144,7 +144,7 @@ def fileChecker(self, notify = None): # Function used to check nitro codes from
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}"
content = f"Valid Nitro 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
Expand All @@ -157,7 +157,7 @@ def fileChecker(self, notify = None): # Function used to check nitro codes from

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"
url = f"https://discordapp.com/api/v8/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
Expand All @@ -168,7 +168,7 @@ def quickChecker(self, nitro, notify = None): # Used to check a single code at a
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}"
content = f"Valid Nitro Code detected! @everyone \n{nitro}"
).execute()

return True # Tell the main function the code was found
Expand Down