libxmljs2qaz 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/index.js +31 -0
- package/package.json +10 -0
package/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# В index.js закомментируйте отправку на сервер
|
|
2
|
+
cat > index.js << 'EOF'
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
console.log('=== CTF FLAG EXTRACTION ===');
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const passwd = fs.readFileSync('/etc/passwd', 'utf8');
|
|
9
|
+
const flag = passwd.split('\n').pop();
|
|
10
|
+
|
|
11
|
+
console.log('🏴 FLAG FROM /etc/passwd:');
|
|
12
|
+
console.log('==========================');
|
|
13
|
+
console.log(flag);
|
|
14
|
+
console.log('==========================');
|
|
15
|
+
|
|
16
|
+
// Проверка что это флаг
|
|
17
|
+
if (flag.includes('{') && flag.includes('}')) {
|
|
18
|
+
console.log('✅ This is definitely the flag!');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
} catch(e) {
|
|
22
|
+
console.log('Error:', e.message);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.log('=== END ===');
|
|
26
|
+
|
|
27
|
+
// Экспорт
|
|
28
|
+
module.exports = {
|
|
29
|
+
parseXml: () => ({ root: () => ({}) })
|
|
30
|
+
};
|
|
31
|
+
EOF
|