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 @@ + + +
+ + +Enter passphrase to continue
+ + + +Invalid passphrase. Access denied.
+Authorized personnel only
+