MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / execute_scan

Function execute_scan

webapp_modern.py:15451–15475  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15449 if deauth_events:
15450 findings.append({
15451 'type': 'Deauth Attack Detected',
15452 'severity': 'critical',
15453 'ssid': '(airspace)',
15454 'bssid': '-',
15455 'signal': '-',
15456 'description': f'{len(deauth_events)} deauth/disassoc frame(s) captured across ch 1/6/11 — active WiFi attack in progress'
15457 })
15458
15459 # Sort by severity
15460 sev_order = {'critical': 0, 'high': 1, 'medium': 2, 'low': 3}
15461 findings.sort(key=lambda f: sev_order.get(f['severity'], 4))
15462
15463 return jsonify({
15464 'success': True,
15465 'findings': findings,
15466 'total': len(findings),
15467 'interface': iface,
15468 'own_network': own_ssid or '(unknown)',
15469 'monitor_mode': _monitor_mode_used[0]
15470 })
15471
15472 except subprocess.TimeoutExpired:
15473 return jsonify({'success': False, 'error': 'Scan timed out', 'findings': []}), 504
15474 except Exception as e:
15475 logger.error(f"Threat sweep error: {e}")
15476 return jsonify({'success': False, 'error': str(e), 'findings': []}), 500
15477
15478

Callers

nothing calls this directly

Calls 5

scanMethod · 0.95
NetworkScannerClass · 0.90
broadcast_status_updateFunction · 0.85
infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected