🛡️ 毅轩混淆加密 78满血版

🔐 深思盾 · AES-256 孩子这是深思盾 · 请不要解
📁⬆️

点击上传HTML文件 或 直接粘贴源码

支持 .html / .htm

加密时间将写入文件 · 密钥内嵌·打开即阅
`; } function extractTitle(htmlString) { const match = htmlString.match(/]*>([^<]*)<\/title>/i); return match ? match[1].trim() : '加密文档'; } async function performEncryption() { if (!validatePasswords()) return; const sourceCode = htmlSource.value.trim(); if (!sourceCode) { showError('请输入或上传HTML源码'); return; } hideError(); const password = password1.value; const originalTitle = extractTitle(sourceCode); try { const encryptedBase64 = await encryptWithAES256(sourceCode, password); // 密钥直接嵌入,生成完全自解密文件 lastEncryptedHtml = buildSelfDecryptingHtml(encryptedBase64, originalTitle, password); const sizeInKB = (new Blob([lastEncryptedHtml]).size / 1024).toFixed(2); encryptedSizeSpan.textContent = `大小约 ${sizeInKB} KB`; outputMessage.classList.remove('hidden'); copyBtn.style.display = 'inline-flex'; downloadBtn.style.display = 'inline-flex'; hideError(); } catch (error) { console.error(error); showError('加密过程出错: ' + error.message); lastEncryptedHtml = null; copyBtn.style.display = 'none'; downloadBtn.style.display = 'none'; outputMessage.classList.add('hidden'); } } async function copyToClipboard() { if (!lastEncryptedHtml) return; try { await navigator.clipboard.writeText(lastEncryptedHtml); alert('✅ 加密HTML已复制到剪贴板'); } catch { alert('复制失败,请手动复制'); } } function downloadEncryptedFile() { if (!lastEncryptedHtml) return; const blob = new Blob([lastEncryptedHtml], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `encrypted_深思盾_${new Date().toISOString().slice(0,10)}.html`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } encryptBtn.addEventListener('click', performEncryption); copyBtn.addEventListener('click', copyToClipboard); downloadBtn.addEventListener('click', downloadEncryptedFile); password1.addEventListener('input', hideError); password2.addEventListener('input', hideError); htmlSource.addEventListener('input', hideError); })();