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

Method get_system_wifi_profiles

wifi_manager.py:1091–1110  ·  view source on GitHub ↗

Get all WiFi connection profiles from NetworkManager (system-wide)

(self)

Source from the content-addressed store, hash-verified

1089 self.logger.critical("FAILSAFE: Executing reboot command")
1090 subprocess.run(['sudo', 'reboot'], timeout=5)
1091
1092 except Exception as e:
1093 self.logger.error(f"Error during failsafe reboot: {e}")
1094 # Try alternative reboot method
1095 try:
1096 subprocess.run(['sudo', 'systemctl', 'reboot'], timeout=5)
1097 except:
1098 pass
1099
1100
1101 def _handle_ap_mode_monitoring(self, current_time):
1102 """Handle AP mode monitoring for endless loop with improved recovery"""
1103 if not self.ap_mode_active or not self.ap_mode_start_time:
1104 return
1105 # The wardriving phone-access AP (KEY1) is user-controlled and must not
1106 # be torn down by the endless loop's timeout / known-network recovery —
1107 # it stays up until the user presses KEY1 again.
1108 if getattr(self.shared_data, 'wardrive_ap_active', False):
1109 return
1110
1111 ap_uptime = current_time - self.ap_mode_start_time
1112
1113 # Check for client connections

Callers 3

scan_networksMethod · 0.95

Calls 4

appendMethod · 0.80
debugMethod · 0.80
errorMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected