-
Notifications
You must be signed in to change notification settings - Fork 2
/
Nighty Checker.py
79 lines (61 loc) · 3.4 KB
/
Nighty Checker.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
import requests, colorama, time, random, os, subprocess, threading
from colorama import Fore, init
title = ('Nighty Checker')
init()
request_url = "https://canary.discordapp.com/api/v6/users/@me"
def doIntro():
os.system("cls")
banner = """
███╗ ██╗██╗ ██████╗ ██╗ ██╗████████╗██╗ ██╗ ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗███████╗██████╗
████╗ ██║██║██╔════╝ ██║ ██║╚══██╔══╝╚██╗ ██╔╝ ██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝██╔════╝██╔══██╗
██╔██╗ ██║██║██║ ███╗███████║ ██║ ╚████╔╝ ██║ ███████║█████╗ ██║ █████╔╝ █████╗ ██████╔╝
██║╚██╗██║██║██║ ██║██╔══██║ ██║ ╚██╔╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗ ██╔══╝ ██╔══██╗
██║ ╚████║██║╚██████╔╝██║ ██║ ██║ ██║ ╚██████╗██║ ██║███████╗╚██████╗██║ ██╗███████╗██║ ██║
╚═╝ ╚═══╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
"""
print(banner)
time.sleep(1)
def center(length):
spaces = ""
for i in range(int((120/2-length/2))):
spaces += " "
return spaces
def HorizontalLine():
line = ""
for i in range(120):
line += "="
print(Fore.GREEN + line + Fore.WHITE)
def println(text):
print(f"{Fore.WHITE}[{Fore.RED}!{Fore.WHITE}] {text}")
def printlnr(text):
return f"{Fore.WHITE}[{Fore.CYAN}!{Fore.WHITE}] {text}"
def main():
doIntro()
tokenFileName = input(printlnr("Enter the name of the file in wich are the unchecked tokens (without .txt) : "))
doIntro()
if not os.path.exists(tokenFileName + ".txt"):
open(tokenFileName + '.txt', 'a+') # create the .txt file instead of exiting the program
try:
for item in open(tokenFileName + ".txt", "r").readlines():
CheckToken(item.strip())
println("Every token have been checked.")
input()
exit()
except Exception as e:
print(e)
println("An unexepted error occurred !")
input()
exit()
def CheckToken(token):
req = requests.get(request_url, headers={'authorization': token})
if req.status_code == 401:
println(f"Invalid : {token}")
elif req.status_code == 200:
println(f"Valid : {token}")
with open("Valid Tokens.txt", "a") as f:
f.write(token + "\n")
else:
println("An unexepted error occurred !")
input()
exit()
main()