mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Add TSCM support to distributed agent with local mode parity
- Agent TSCM uses same ThreatDetector and CorrelationEngine as local mode - Added baseline_id parameter support using get_tscm_baseline() - Fixed RF scan stop_check to allow agent-specific stop events - Fixed 'undefined MHz' display for WiFi devices (added essid fallback and null check) - Fixed signal strength type conversion (string to int) for correlation engine - Agent threat detection matches local mode behavior: - No baseline: detects anomaly/hidden_camera threats only - With baseline: also detects new_device threats
This commit is contained in:
@@ -153,10 +153,16 @@ def get_agent_detail(agent_id: int):
|
||||
client = create_client_from_agent(agent)
|
||||
metadata = client.refresh_metadata()
|
||||
if metadata['healthy']:
|
||||
caps = metadata['capabilities'] or {}
|
||||
# Store full interfaces structure (wifi, bt, sdr)
|
||||
agent_interfaces = caps.get('interfaces', {})
|
||||
# Fallback: also include top-level devices for backwards compatibility
|
||||
if not agent_interfaces.get('sdr_devices') and caps.get('devices'):
|
||||
agent_interfaces['sdr_devices'] = caps.get('devices', [])
|
||||
update_agent(
|
||||
agent_id,
|
||||
capabilities=metadata['capabilities'].get('modes') if metadata['capabilities'] else None,
|
||||
interfaces={'devices': metadata['capabilities'].get('devices', [])} if metadata['capabilities'] else None,
|
||||
capabilities=caps.get('modes'),
|
||||
interfaces=agent_interfaces,
|
||||
update_last_seen=True
|
||||
)
|
||||
agent = get_agent(agent_id)
|
||||
@@ -215,10 +221,15 @@ def refresh_agent_metadata(agent_id: int):
|
||||
|
||||
if metadata['healthy']:
|
||||
caps = metadata['capabilities'] or {}
|
||||
# Store full interfaces structure (wifi, bt, sdr)
|
||||
agent_interfaces = caps.get('interfaces', {})
|
||||
# Fallback: also include top-level devices for backwards compatibility
|
||||
if not agent_interfaces.get('sdr_devices') and caps.get('devices'):
|
||||
agent_interfaces['sdr_devices'] = caps.get('devices', [])
|
||||
update_agent(
|
||||
agent_id,
|
||||
capabilities=caps.get('modes'),
|
||||
interfaces={'devices': caps.get('devices', [])},
|
||||
interfaces=agent_interfaces,
|
||||
update_last_seen=True
|
||||
)
|
||||
agent = get_agent(agent_id)
|
||||
|
||||
Reference in New Issue
Block a user