/* ============================================================ FLOWSHIELD — Login (gated: daynko / !Aa123456789.) ============================================================ */ const { useState: useStateL, useEffect: useEffectL, useRef: useRefL } = React; function MatrixRain() { const ref = useRefL(null); useEffectL(() => { const cv = ref.current; if (!cv) return; const ctx = cv.getContext('2d'); let w, h, cols, drops; const chars = '01░▒▓<>{}[]/\\|=+*ABCDEF0123456789アカサタナ'; function resize(){ w = cv.width = cv.offsetWidth; h = cv.height = cv.offsetHeight; cols = Math.floor(w/16); drops = Array(cols).fill(0).map(()=>Math.random()*-50); } resize(); function draw(){ if (document.hidden) return; ctx.fillStyle = 'rgba(5,7,13,0.18)'; ctx.fillRect(0,0,w,h); ctx.font = '13px JetBrains Mono'; for (let i=0;i0.96 ? 'rgba(0,245,192,0.9)' : 'rgba(0,245,192,0.32)'; ctx.fillText(ch, x, y); if (y > h && Math.random()>0.975) drops[i]=0; drops[i]++; } } const timer = setInterval(draw, 70); window.addEventListener('resize', resize); return () => { clearInterval(timer); window.removeEventListener('resize', resize); }; }, []); return ; } function Login({ onAuth }) { const [u, setU] = useStateL(''); const [p, setP] = useStateL(''); const [show, setShow] = useStateL(false); const [err, setErr] = useStateL(''); const [busy, setBusy] = useStateL(false); const [boot, setBoot] = useStateL([]); const BOOT = [ '> flowshield secure-shell v3.4.1', '> inicializando módulo criptográfico … OK', '> verificando integridad del kernel … OK', '> red team / blue team / normativa … cargados', '> esperando autenticación del operador_', ]; useEffectL(() => { let i = 0; const t = setInterval(() => { const cur = BOOT[i]; setBoot(b => [...b, cur]); i++; if (i >= BOOT.length) clearInterval(t); }, 380); return () => clearInterval(t); }, []); const submit = async (e) => { e.preventDefault(); setErr(''); setBusy(true); try { const data = await window.fsAuth.login(u.trim(), p); setBoot(b => [...b, '> credenciales válidas · acceso concedido ✓']); setTimeout(() => onAuth(data), 600); } catch (ex) { setErr((ex && ex.status === 401) ? 'ACCESO DENEGADO · credenciales no válidas' : ('ERROR · ' + (ex && ex.message ? ex.message : 'no se pudo autenticar'))); setBusy(false); } }; return (
{/* Left: brand + boot terminal */}
Plataforma unificada de operaciones de seguridad ofensiva, defensiva y cumplimiento normativo.
{boot.map((l, i) => (
{l}
))}
NODO SEGURO · ES-MAD-01
{/* Right: login form */}
// acceso restringido

Autenticación

Sólo operadores autorizados. Modelo base.

setU(e.target.value)} autoFocus />
setP(e.target.value)} style={{ paddingRight:42 }} />
{err && (
{err}
)} {busy ? 'AUTENTICANDO…' : 'INICIAR SESIÓN'}
2FA · cifrado AES-256 v3.4.1
FLOWSHIELD © 2026 · uso autorizado únicamente
); } Object.assign(window, { Login });