-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathNitroTools-linux.py
434 lines (316 loc) · 16.8 KB
/
NitroTools-linux.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
import random, string, os, requests, subprocess
from art import text2art
# Black
fgBlack = "\033[30m"
# Red
fgRed = "\033[31m"
# Green
fgGreen = "\033[32m"
bgBrightGreen = "\033[42;1m"
# Magenta
fgMagenta = "\033[35m"
bgMagenta = "\033[45m"
fgMagenta162 = '\u001b[38;5;162m'
fgMagenta163 = '\u001b[38;5;163m'
fgMagenta164 = '\u001b[38;5;164m'
fgMagenta170 = '\u001b[38;5;170m'
fgMagenta171 = '\u001b[38;5;171m'
fgMagenta198 = '\u001b[38;5;198m'
fgMagenta199 = '\u001b[38;5;199m'
fgMagenta200 = '\u001b[38;5;200m'
fgMagenta201 = '\u001b[38;5;201m'
#Cyan
fgBrightCyan = "\033[36m"
reset = "\033[0m"
def genCod():
generated = 0
try:
num=int(input("\n{}¿Cuántos códigos quieres generar? > {}".format(fgMagenta,reset)))
print('\n')
path = str(os.path.dirname(__file__)) + "codes.txt"
f=open("codes.txt","w+", encoding='utf-8')
for kele in range(num):
nitro = ''.join(random.choice(string.ascii_uppercase + string.digits + string.ascii_lowercase) for _ in range(16))
print('{}[GENERADO]{} https://discord.gift/{}'.format(fgMagenta,reset,nitro))
generated += 1
f.write('https://discord.gift/{}\n'.format(nitro))
f.close()
if num == 1:
print("\nSe generó {}{}{} código nitro".format(fgMagenta,num,reset))
else:
print("\nSe generaron {}{}{} códigos nitro".format(fgMagenta,num,reset))
input("\n{}Presiona Enter para volver al Menu de Inicio.{}".format(fgMagenta,reset))
if input == input:
#plataformas()
main()
except ValueError:
genCod()
def clear():
if os.name == "posix":
return os.system ("clear")
elif os.name == "ce" or os.name == "nt" or os.name == "dos":
return os.system ("cls")
def genCheckCod():
contador = 0
try:
cantidadGenerar = int(input('cuantos códigos quieres {}generar{} y {}checkear{} > '.format(fgMagenta,reset,fgMagenta,reset)))
except ValueError:
genCheckCod()
print (f'''asegúrate de introducir la url de un webhook válido/activo ;) \n''')
try:
url = input('{}URL del WebHook: {} '.format(fgMagenta,reset))
print('\n')
while contador < cantidadGenerar:
contador += 1
code = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(16))
def post_code(url, code):
requests.post(url, data={'content':'@everyone\n'+code})
def check(code):
status_code = requests.get('https://discordapp.com/api/v9/entitlements/gift-codes/'+code+'?with_application=false&with_subscription_plan=true').status_code
if status_code == 200:
print('{}{}[VÁLIDO] https://discord.gg/{}{}'.format(bgBrightGreen,fgBlack,code,reset))
post_code(url, code)
else:
print('{}[INVÁLIDO] > https://discord.gg/{}{}'.format(fgRed,code,reset))
check(code)
try:
l = input("\n{}Presiona Enter para volver al Menu de Inicio.{}".format(fgMagenta,reset))
if l == '':
main()
except ValueError:
genCheckCod()
except ValueError:
print('introduzca un valor válido')
genCheckCod()
def genCodWindows():
clear()
print('{}{} Generador y Checker de códigos nitro Windows {}\n'.format(bgMagenta,fgBlack,reset))
contador = 0
try:
cantidadGenerar = int(input('cuantos códigos quieres {}generar{} y {}checkear{}> '.format(fgMagenta,reset,fgMagenta,reset)))
print (f'''Asegúrese de introducir la url de un webhook válido/activo ;) ''')
url = input('{}URL del WebHook: {} '.format(fgMagenta,reset))
while contador < cantidadGenerar:
contador += 1
code = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(16))
def post_code(url, code):
requests.post(url, data={'content':'@everyone\n'+code})
def check(code):
status_code = requests.get('https://discordapp.com/api/v9/entitlements/gift-codes/'+code+'?with_application=false&with_subscription_plan=true').status_code
if status_code == 200:
print('{}{}[VÁLIDO] https://discord.gg/{}{}'.format(bgBrightGreen,fgBlack,code,reset))
post_code(url, code)
else:
print('{}[INVÁLIDO] > https://discord.gg/{}{}'.format(fgRed,code,reset))
check(code)
try:
l = input("\n{}Presiona Enter para volver al Menu de Inicio.{}".format(fgMagenta,reset))
if input == input:
main()
except ValueError:
main()
except ValueError:
genCodWindows()
def check():
checked = 0
valido = 0
invalido = 0
f=open("codes.txt","r+", encoding='utf-8')
v=open("valid_codes.txt","w+", encoding='utf-8')
for line in f:
nitro = line.strip("\n")
url = "https://discordapp.com/api/v9/entitlements/gift-codes/" + nitro + "?with_application=false&with_subscription_plan=true"
r = requests.get(url)
if r.status_code == 200:
print('{}[VÁLIDO]{}{}'.format(fgGreen,reset,nitro))
v.write(f"{nitro}\n")
checked += 1
valido += 1
else:
print('{}[INVÁLIDO]{}{}'.format(fgRed,reset,nitro))
checked += 1
invalido += 1
f.close()
v.close()
print("\nSe checkearon {}{}{} códigos nitro, {}{}{} Válidos ,{}{}{} Inválidos\n".format(fgMagenta,checked,reset,fgGreen,valido,reset,fgRed,invalido,reset))
try:
l = input("\n{}Presiona Enter para volver al Menu de Inicio.{}".format(fgMagenta,reset))
if input == input:
main()
except ValueError:
main()
def creditos():
clear()
print('{}{} CRÉDITOS {}'.format(bgMagenta,fgBlack,reset))
print('''
{}Verduxo ayuda + apoyo {}https://github.com/Verduxo{}
'''.format(fgMagenta,fgBrightCyan,reset))
try:
l = input("\n{}Presiona Enter para volver al Menu de Inicio.{}".format(fgMagenta,reset))
if input == input:
main()
except ValueError:
main()
def repoWindows():
clear()
print('{}{}NitroTool-Windows descarga{}'.format(bgMagenta,fgBlack,reset))
try:
print(' ')
respuesta = int(input('({}1{} para {}si{}, {}0{} para {}no{})\n¿desea descargar el repositorio? [{}1{}/{}0{}] '.format(fgGreen,reset,fgGreen,reset,fgRed,reset,fgRed,reset,fgGreen,reset,fgRed,reset)))
if int(respuesta)== 1:
cmdCommand = "git clone https://github.com/tt-viic/NitroTool-Windows"
process = subprocess.Popen(cmdCommand.split(), stdout=subprocess.PIPE)
output, error = process.communicate()
print(' ')
print('REPOSITORIO CLONADO EN: ', os.getcwd())
try:
l = input("\n{}Presiona Enter para volver al Menu de Inicio.{}".format(fgMagenta,reset))
if input == input:
main()
except ValueError:
main()
elif int(respuesta) == 0:
print('{}ok, pero si quieres, aquí tienes el link {}{}https://github.com/tt-viic/NitroTool-Windows{}{} :){} '.format(fgMagenta,reset,fgBrightCyan,reset,fgMagenta,reset))
try:
l = input("\n{}Presiona Enter para volver al Menu de Inicio.{}".format(fgMagenta,reset))
if input == input:
main()
except ValueError:
main()
except ValueError:
repoWindows()
def banner():
fuentes = ['speed','fuzzy','epic','drpepper','doom','cyber large','cosmic','computer','chunky','graffiti','banner4','Fire Font-k','Flower Power','Graceful','ogre','Rectangles','slant relief','small','Bloody','THIS']
banner=text2art(" DISCORD NITRO",fuentes[random.randrange(0,len(fuentes))])
print('{}'.format(fgMagenta)+banner+'{}'.format(reset))
def opcionesLinux():
clear()
banner()
print(' ')
print('''
┌────────────────────────────────────────────────────────────────────────────────┐
│ ¿Qué quieres hacer? {}--LINUX{} │
├────────────────────────────────────────────────────────────────────────────────┤
│ {}[1] Generar códigos de Discord Nitro {} │
│ {}[2] Generar y checkear códigos de Discord Nitro automáticamente{} │
│ {}[3] Checkear los códigos de Discord Nitro generados {} │
│ {}[99] EXIT, saldrás del programa{} │
└────────────────────────────────────────────────────────────────────────────────┘
'''.format(fgRed,reset,fgMagenta171,reset,fgMagenta170,reset,fgMagenta171,reset,fgMagenta199,reset))
def opcionesWindows():
clear()
banner()
print(' ')
print('''
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ¿Continúas? {}--WINDOWS {}│
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ {}Bien, antes de nada, te recomiendo usar este repositorio {}https://github.com/tt-viic/NitroTool-Windows{} │
│ {}(Cumple exactamente la misma función que este pero tiene una mejor UI y optimización){} │
│ │
│ {}[1] Sí, deseo continuar en este script{} │
│ {}[2] No, quiero instalar NitroTool-Windows{} │
│ {}[99] EXIT, saldrás del programa{} │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
'''.format(fgRed,reset,fgMagenta198,fgBrightCyan,reset,fgMagenta198,reset,fgMagenta199,reset,fgMagenta200,reset,fgMagenta201,reset))
def opcionesWindows2():
clear()
banner()
print(' ')
print('''
┌──────────────────────────────────────────────────────────────────────────────┐
│ ¿Qué quieres hacer? {}--WINDOWS{} │
├──────────────────────────────────────────────────────────────────────────────┤
│ {}[1] Generar códigos de Discord Nitro {} │
│ {}[2] Generar y checkear códigos de Discord Nitro automáticamente{} │
│ {}[3] Checkear los códigos de Discord Nitro generados {} │
│ {}[99] EXIT, saldrás del programa{} │
└──────────────────────────────────────────────────────────────────────────────┘
'''.format(fgRed,reset,fgMagenta198,reset,fgMagenta198,reset,fgMagenta199,reset,fgMagenta200,reset,fgMagenta201,reset))
def plataformas():
print('''
╔════════════════════════════════════╗
║ ¿En qué plataforma se encuentra? ║
╠════════════════════════════════════╣
║ {}[1] Linux{} ║
║ {}[2] Windows{} ║
║ {}[0] Créditos{} ║
║ {}[99] salir{} ║
╚════════════════════════════════════╝
'''.format(fgMagenta162,reset,fgMagenta163,reset,fgMagenta164,reset,fgMagenta164,reset))
def salir():
clear()
print('¡Hasta pronto! \033[31;1m<3')
exit()
def main():
clear()
banner()
plataformas()
try:
plataforma = int(input('{}plataforma: {}'.format(fgMagenta,reset)))
if (plataforma == 1):
try:
opcionesLinux()
opcionLinux = int(input('{}opción: {}'.format(fgMagenta,reset)))
if opcionLinux == 1:
clear()
print(' {}{} Nitro Code Generator by viic \n{}'.format(bgMagenta,fgBlack,reset))
genCod()
elif opcionLinux == 2:
clear()
print(' {}{} Generador y Checker de códigos nitro {}\n'.format(bgMagenta,fgBlack,reset))
genCheckCod()
elif opcionLinux == 3:
clear()
print(' {}{} Nitro Code Checker by viic {}\n'.format(bgMagenta,fgBlack,reset))
check()
elif opcionLinux == 99:
salir()
else:
main()
except ValueError:
main()
elif (plataforma == 2):
opcionesWindows()
try:
opcionWindows = int(input('opción: '))
if opcionWindows == 1:
opcionesWindows2()
try:
opcionWindows2 = int(input('opción: '))
if opcionWindows2 == 1:
clear()
print(' {}{} Nitro Code Generator by viic {} {}--WINDOWS{}\n'.format(bgMagenta,fgBlack,reset,fgRed,reset))
genCod()
elif opcionWindows2 == 2:
clear()
print('{}{} Generador y Checker de códigos nitro {} {}--WINDOWS{}\n'.format(bgMagenta,fgBlack,reset,fgRed,reset))
genCheckCod()
elif opcionWindows2 == 3:
clear()
print(' {}{} Nitro Code Checker by viic {} {}--WINDOWS{}\n'.format(bgMagenta,fgBlack,reset,fgRed,reset))
check()
elif opcionWindows2 == 99:
salir()
else:
main()
except ValueError:
main()
elif opcionWindows == 2:
repoWindows()
elif opcionWindows == 99:
salir()
else:
main()
except ValueError:
main()
elif (plataforma == 0):
creditos()
elif (plataforma == 99):
salir()
else:
main()
except ValueError:
main()
banner()
main()