Files
Cobra 3153b7e8a3 Robust interface detection — retry fallback chain for headless boot (#206)
Fixes interface auto-detection failures on Pi Zero 2W where wlan0 doesn't exist
at boot. Implementation:

- Added detect_interface_with_retry() function with 3x retry fallback chain
- Config-supplied interface preferred, then /proc/net/route, then UP interface
- Exponential backoff: 5s, 10s, 20s delays between retries
- Filters excluded prefixes: lo, tailscale*, wg*, tun*, docker*, veth*, br-*
- Used in Engine.__init__(), PacketCapture.start(), MacManager.start()
- Full test coverage: 10 tests for detection, backoff, filtering

Addresses issue where network stack initializes after boot and interfaces
become available after 5-10 second delay.
2026-04-08 20:58:43 -04:00

18 lines
777 B
Python

from utils.crypto import encrypt_file, decrypt_file, derive_key, CryptoEngine
from utils.networking import (
get_primary_interface, get_bridge_candidates, get_wifi_interfaces,
get_mac, set_mac, get_ip, compile_bpf, send_gratuitous_arp,
interface_up, interface_down, create_vlan_interface,
detect_interface_with_retry,
)
from utils.logging import BBLogger
from utils.stealth import (
rename_process, spoof_cmdline, set_sysctl, timestomp, disable_core_dumps,
)
from utils.resource import HardwareInfo, get_hardware_tier, get_resource_usage
from utils.permissions import (
check_root, check_capability, drop_privileges, enforce_directory_permissions,
)
from utils.config_loader import load_config, ConfigLoader
from utils.bettercap_api import BettercapAPI