(info)
| 4337 | const _WIFIDEF_THREAT = { |
| 4338 | clear: ['CLEAR', 'bg-green-600/20 text-green-300 border border-green-600/50'], |
| 4339 | warning: ['WARNING', 'bg-amber-600/20 text-amber-300 border border-amber-600/50'], |
| 4340 | critical: ['⚠ UNDER ATTACK', 'bg-red-600/25 text-red-300 border border-red-600/60'], |
| 4341 | }; |
| 4342 | |
| 4343 | function initWifiDefense() { |
| 4344 | _wifidefFillIfaces(); |
| 4345 | // Load the persisted beacon-flood threshold into the control. |
| 4346 | fetch('/api/wifidef/thresholds').then(r => r.json()).then(t => { |
| 4347 | const el = document.getElementById('wifidef-flood-ssids'); |
| 4348 | if (el && t && t.beacon_ssids) el.value = t.beacon_ssids; |
| 4349 | }).catch(() => {}); |
| 4350 | const auto = document.getElementById('wifidef-auto'); |
| 4351 | if (auto && !auto._wired) { |
| 4352 | auto._wired = true; |
| 4353 | auto.addEventListener('change', (e) => { |
no test coverage detected