- Fix async subprocess.communicate() usage: await before unpacking tuple
Changed from: stderr = await proc.communicate()[1]
To: _, stderr = await proc.communicate()
- Remove snaplen parameter from sniff() calls (not supported for live interface capture)
- Update messages to reflect that full packets are captured for live capture
- Remove redundant proc.wait() calls after communicate()
Co-authored-by: Cursor <cursoragent@cursor.com>
- Rename MonitorModeSetup class to WiFiMonitor (better naming)
- Add async start() method for setting up monitor mode
- Add async stop() method for restoring interface to managed mode
- Convert all subprocess calls to async (asyncio.create_subprocess_exec)
- Add is_started property to track monitor mode state
- Update capture methods to use async implementation
- Use try/finally to ensure proper cleanup
- Run blocking scapy sniff() calls in executor for async compatibility
- Improve error handling with proper stderr communication
Co-authored-by: Cursor <cursoragent@cursor.com>