Add RF scanning and improve TSCM device naming

- Add _scan_rf_signals() function using rtl_power to scan:
  - FM broadcast band (88-108 MHz) for potential bugs
  - 315/433/868/915 MHz ISM bands
  - 1.2 GHz video transmitter band
  - 2.4 GHz ISM band
- Integrate RF scanning into sweep with 60-second interval
- Add display_name field for all devices with friendly names
- Update frontend to use display_name in dropdowns
- Improve scan status display: '14 WiFi | 20 BT | 3 RF' instead of '14w 20b'
- Auto-select first SDR device when available
This commit is contained in:
Smittix
2026-01-14 13:40:13 +00:00
parent 153336d757
commit 0acbf87dde
2 changed files with 224 additions and 19 deletions
+19 -6
View File
@@ -9646,7 +9646,7 @@
devices.wifi_interfaces.forEach(iface => {
const opt = document.createElement('option');
opt.value = iface.name;
opt.textContent = `${iface.name}${iface.type ? ' (' + iface.type + ')' : ''}`;
opt.textContent = iface.display_name || iface.name;
wifiSelect.appendChild(opt);
});
// Auto-select first interface
@@ -9664,7 +9664,7 @@
devices.bt_adapters.forEach(adapter => {
const opt = document.createElement('option');
opt.value = adapter.name;
opt.textContent = `${adapter.name}${adapter.status ? ' [' + adapter.status + ']' : ''}`;
opt.textContent = adapter.display_name || adapter.name;
btSelect.appendChild(opt);
});
// Auto-select first adapter
@@ -9682,9 +9682,13 @@
devices.sdr_devices.forEach(dev => {
const opt = document.createElement('option');
opt.value = dev.index;
opt.textContent = `${dev.index}: ${dev.name || 'SDR Device'}`;
opt.textContent = dev.display_name || dev.name || 'SDR Device';
sdrSelect.appendChild(opt);
});
// Auto-select first SDR if available
if (devices.sdr_devices.length > 0) {
sdrSelect.value = devices.sdr_devices[0].index;
}
} else {
sdrSelect.innerHTML = '<option value="">No SDR devices found</option>';
}
@@ -9873,9 +9877,18 @@
}
// Update status text
const statusText = data.threats_found > 0
? `THREATS: ${data.threats_found}`
: `SCANNING ${data.wifi_count}W ${data.bt_count}B`;
let statusText = 'SCANNING...';
if (data.threats_found > 0) {
statusText = `THREATS: ${data.threats_found}`;
} else if (data.status) {
statusText = data.status;
} else {
const parts = [];
if (data.wifi_count > 0) parts.push(`${data.wifi_count} WiFi`);
if (data.bt_count > 0) parts.push(`${data.bt_count} BT`);
if (data.rf_count > 0) parts.push(`${data.rf_count} RF`);
statusText = parts.length > 0 ? parts.join(' | ') : 'SCANNING...';
}
document.getElementById('tscmProgressLabel').textContent = statusText;
// Update counts in sidebar (from severity_counts object)