-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
120 lines (100 loc) · 4.24 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import threading,ctypes,string,os,time,requests,numpy
from pystyle import Colors, Colorate
from discord_webhook import DiscordWebhook
USE_WEBHOOK = True
time.sleep(1)
os.system('cls' if os.name == 'nt' else 'clear')
class NitroGen:
def __init__(self):
self.fileName = "NitroC.txt"
def main(self):
os.system('cls' if os.name == 'nt' else 'clear')
if os.name == "nt":
print("")
ctypes.windll.kernel32.SetConsoleTitleW(
"Nitro G-C ProxyLess By @MaybeMeXD")
else:
print(f'\33]0;Nitro Generator and Checker \a',
end='', flush=True)
print(Colorate.Horizontal(Colors.blue_to_red, """ _ _ _ _ _____ _____
| \ | (_) | / ____| / ____|
| \| |_| |_ _ __ ___ | | __ ______| |
| . ` | | __| '__/ _ \ | | |_ |______| |
| |\ | | |_| | | (_) | | |__| | | |____
|_| \_|_|\__|_| \___/ \_____| \_____|
""", 3))
self.slowType(
"\nInput How Many Codes to Generate and Check: ", .00, newLine=False)
try:
num = int(input(''))
except ValueError:
input("Specified input wasn't a number.\nPress enter to exit")
exit()
if USE_WEBHOOK:
self.slowType(
"If you want to use a Discord webhook, type it here or press enter to ignore: ", .00, newLine=False)
url = input('')
webhook = url if url != "" else None
if webhook is not None:
DiscordWebhook(
url=url,
content=f"```Started checking urls\nI will send any valid codes here```"
).execute()
valid = []
invalid = 0
chars = []
chars[:0] = string.ascii_letters + string.digits
c = numpy.random.choice(chars, size=[num, 16])
for s in c:
try:
code = ''.join(x for x in s)
url = f"https://discord.gift/{code}"
result = self.quickChecker(url, webhook)
if result:
valid.append(url)
else:
invalid += 1
except KeyboardInterrupt:
print("\nInterrupted by user")
break
except Exception as e:
print(f" Error | {url} ")
if os.name == "nt":
ctypes.windll.kernel32.SetConsoleTitleW(
f"Nitro G-C - {len(valid)} Valid | {invalid} Invalid - ") # Change the title
print("")
else:
print(
f'\33]0;Nitro G-C - {len(valid)} Valid | {invalid} Invalid - Made by Drillenissen#4268 UPDATED BY https://github.com/MaybeMeXD\a', end='', flush=True)
print(f"""
Results:
Valid: {len(valid)}
Invalid: {invalid}""")
input("\nCheck Finish ! Press Enter to close the program.")
def slowType(self, text: str, speed: float, newLine=True):
for i in text:
print(i, end="", flush=True)
time.sleep(speed)
if newLine:
print()
def quickChecker(self, nitro:str, notify=None):
url = f"https://discordapp.com/api/v9/entitlements/gift-codes/{nitro}?with_application=false&with_subscription_plan=true"
response = requests.get(url)
if response.status_code == 200:
print(f" Valid | {nitro} ", flush=True,
end="" if os.name == 'nt' else "\n")
with open("Nitro Codes.txt", "w", encoding="utf8") as file:
file.write(nitro)
if notify is not None:
DiscordWebhook(
url=url,
content=f"BRO WTF GOT A NITRO IN A NITRO GEN !! @everyone \n{nitro}"
).execute()
return True
else:
print(f" Invalid | {nitro} ", flush=True,
end="" if os.name == 'nt' else "\n")
return False
if __name__ == '__main__':
Gen = NitroGen()
Gen.main()