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

Function _emit_manual_attack_update

webapp_modern.py:15094–15106  ·  view source on GitHub ↗
(action, ip, port, stage, message, status='info')

Source from the content-addressed store, hash-verified

15092
15093 return jsonify({
15094 'success': True,
15095 'prefer_ethernet': bool(prefer),
15096 'current_preferred': preferred,
15097 'message': f"Ethernet {'will be' if prefer else 'will not be'} preferred over WiFi",
15098 })
15099 except Exception as exc:
15100 logger.error(f"Failed to set Ethernet preference: {exc}")
15101 return jsonify({'success': False, 'error': str(exc)}), 500
15102
15103
15104@app.route('/api/network/preferred-interface', methods=['GET'])
15105def get_preferred_scan_interface():
15106 """Get the preferred interface for network scanning (Ethernet or WiFi)."""
15107 try:
15108 state = _get_multi_interface_state()
15109 state.refresh_from_system() # Refresh both WiFi and Ethernet

Callers 2

execute_manual_attackFunction · 0.85
execute_attackFunction · 0.85

Calls 2

emitMethod · 0.80
warningMethod · 0.80

Tested by

no test coverage detected