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

Function get_ethernet_scan_enabled

webapp_modern.py:11335–11350  ·  view source on GitHub ↗

Get Ethernet scanning enabled status.

()

Source from the content-addressed store, hash-verified

11333@app.route('/api/wardriving/serial/detect', methods=['GET'])
11334def wardriving_serial_detect():
11335 """Auto-detect all ESP32 companions on serial ports."""
11336 try:
11337 engine = _get_wardriving_engine()
11338 ports = engine._detect_all_esp32_serial()
11339 return jsonify({'found': bool(ports), 'ports': ports, 'port': ports[0] if ports else ''})
11340 except Exception as e:
11341 logger.error(f"Wardriving serial detect error: {e}")
11342 return jsonify({'found': False, 'ports': [], 'port': '', 'error': str(e)})
11343
11344@app.route('/api/wardriving/serial', methods=['GET', 'POST'])
11345def wardriving_serial():
11346 """Get or set serial ESP32 listener configuration. Supports multiple companions."""
11347 try:
11348 engine = _get_wardriving_engine()
11349
11350 if request.method == 'GET':
11351 companions = [c.as_dict() for c in engine._companions.values()]
11352 return jsonify({
11353 'connected': engine.serial_connected,

Callers

nothing calls this directly

Calls 5

get_ethernet_statusMethod · 0.80
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected