diff --git a/static/css/index.css b/static/css/index.css index e3fcf7f..a8465f5 100644 --- a/static/css/index.css +++ b/static/css/index.css @@ -3040,8 +3040,25 @@ body::before { padding: 2px 6px; border-radius: 3px; font-size: 9px; +} + +/* Rogue AP Indicator */ +.rogue-indicator { + background: linear-gradient(90deg, #ff0000, #cc0000); + color: #fff; + padding: 4px 8px; + margin: -10px -10px 8px -10px; + font-size: 10px; font-weight: bold; - margin-left: 5px; + text-align: center; + text-transform: uppercase; + letter-spacing: 1px; + animation: rogue-pulse 1.5s infinite; +} + +@keyframes rogue-pulse { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.7; } } /* PMKID Capture */ diff --git a/templates/index.html b/templates/index.html index 4382f0e..ecb833c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3737,6 +3737,7 @@ let detectedDrones = {}; // Track detected drones by BSSID let ssidToBssids = {}; // Track SSIDs to their BSSIDs for rogue AP detection let rogueApDetails = {}; // Store details about rogue APs: {ssid: [{bssid, signal, channel, firstSeen}]} + let rogueBssids = new Set(); // Track all BSSIDs that are suspected rogues let activeCapture = null; // {bssid, channel, file, startTime, pollInterval} let watchMacs = JSON.parse(localStorage.getItem('watchMacs') || '[]'); let alertedMacs = new Set(); // Prevent duplicate alerts per session @@ -3953,10 +3954,20 @@ document.getElementById('rogueApCount').textContent = rogueApCount; playAlert(); + // Mark ALL BSSIDs with this SSID as suspected rogues + ssidToBssids[ssid].forEach(b => rogueBssids.add(b)); + // Get the BSSIDs to show in alert const bssidList = rogueApDetails[ssid].map(e => e.bssid).join(', '); showInfo(`⚠ Rogue AP: "${ssid}" has ${ssidToBssids[ssid].size} BSSIDs: ${bssidList}`); showNotification('⚠️ Rogue AP Detected!', `"${ssid}" on multiple BSSIDs`); + + // Update all network cards with this SSID to show rogue indicator + ssidToBssids[ssid].forEach(rogueBssid => { + const net = wifiNetworks[rogueBssid]; + if (net) addWifiNetworkCard(net, false); + }); + return true; } return false; @@ -4976,11 +4987,13 @@ const power = parseInt(net.power) || -100; const signalPercent = Math.max(0, Math.min(100, (power + 100) * 2)); const signalColor = power >= -50 ? 'var(--accent-green)' : power >= -70 ? 'var(--accent-orange)' : 'var(--accent-red)'; + const isRogue = rogueBssids.has(net.bssid); panel.innerHTML = ` + ${isRogue ? '
⚠️ SUSPECTED ROGUE ACCESS POINT
' : ''}
-
${escapeHtml(net.essid || '[Hidden]')}
+
${escapeHtml(net.essid || '[Hidden]')}
${escapeHtml(net.bssid)}
@@ -5100,8 +5113,18 @@ const wpsEnabled = net.wps === '1' || net.wps === 'Yes' || (net.privacy || '').includes('WPS'); const wpsHtml = wpsEnabled ? 'WPS' : ''; + const isRogue = rogueBssids.has(net.bssid); + const rogueHtml = isRogue ? '
⚠️ SUSPECTED ROGUE AP
' : ''; + + // Update card border for rogue APs + if (isRogue) { + card.style.borderLeftColor = 'var(--accent-red)'; + card.style.borderLeftWidth = '4px'; + card.style.background = 'rgba(255, 0, 0, 0.1)'; + } card.innerHTML = ` + ${rogueHtml}
${escapeHtml(net.essid || '[Hidden]')}${wpsHtml} CH ${net.channel}