diff --git a/generate-encrypted.js b/generate-encrypted.js new file mode 100644 index 0000000..4c08870 --- /dev/null +++ b/generate-encrypted.js @@ -0,0 +1,23 @@ +const CryptoJS = require('crypto-js'); +const fs = require('fs'); + +// 读取原始 HTML +const originalHtml = fs.readFileSync('nav-home.html', 'utf8'); + +// 使用密码加密 +const password = 'joylodging'; +const encrypted = CryptoJS.AES.encrypt(originalHtml, password).toString(); + +// 读取模板 +let template = fs.readFileSync('nav-home-encrypted.html', 'utf8'); + +// 替换占位符 +template = template.replace('const ENCRYPTED_CONTENT = "ENCRYPTED_PLACEHOLDER";', + `const ENCRYPTED_CONTENT = "${encrypted}";`); + +// 写入最终文件 +fs.writeFileSync('nav-home-encrypted.html', template); + +console.log('Encryption complete!'); +console.log('Encrypted content length:', encrypted.length); +console.log('First 100 chars:', encrypted.substring(0, 100)); diff --git a/nav-home-encrypted.html b/nav-home-encrypted.html new file mode 100644 index 0000000..58eefeb --- /dev/null +++ b/nav-home-encrypted.html @@ -0,0 +1,214 @@ + + + + + + Access Required + + + +
+ +
+
🔐
+

ACCESS REQUIRED

+

Enter passphrase to continue

+ +
+
+ +
+ +
+ +

Invalid passphrase. Access denied.

+

Authorized personnel only

+
+ + + + + diff --git a/nav-home.html b/nav-home.html index 30aa1e9..0d7e8df 100644 --- a/nav-home.html +++ b/nav-home.html @@ -897,7 +897,7 @@ id: 'fnos', name: '飞牛NAS', description: 'NAS存储 · 文件管理', - url: 'http://100.118.62.18:5000', + url: 'http://100.118.62.18:5667', icon: '💾', isCustom: false }, diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c0cfd35 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "ai-community", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "crypto-js": "^4.2.0" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9bd309c --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "crypto-js": "^4.2.0" + } +}