Return the running wardriving engine instance, or None.
(self)
| 2422 | try: |
| 2423 | # Use nmcli to bring up the connection |
| 2424 | result = subprocess.run(['nmcli', 'connection', 'up', network], |
| 2425 | capture_output=True, text=True, timeout=30) |
| 2426 | if result.returncode == 0: |
| 2427 | # Wait a moment and check connection |
| 2428 | time.sleep(5) |
| 2429 | if self.check_wifi_connection(): |
| 2430 | self.logger.info(f"Successfully connected to autoconnect network: {network}") |
| 2431 | return True |
| 2432 | else: |
| 2433 | self.logger.warning(f"Failed to connect to {network}: {result.stderr}") |
| 2434 | except Exception as e: |
| 2435 | self.logger.warning(f"Error connecting to {network}: {e}") |
| 2436 |
no outgoing calls
no test coverage detected