Terminal REPL desync/freeze when events.stream is disabled via Web UI
Description
There is a synchronization failure between the API and the local terminal session (REPL). When the events.stream module is toggled OFF via the Web UI (regardless of HTTP or HTTPS mode), the local terminal stops refreshing its prompt and ceases to echo user keystrokes. The terminal remains functional (commands entered blindly are still executed), but visual feedback is lost
Enviroment
Bettercap version: v2.41.7 (Natively compiled from source)
OS version and architecture: Fedora 43 (x86_64)
Go version: 1.25.9
Terminals tested: Kitty, COSMIC Terminal (Default Fedora Cosmic)
UI Modes tested: HTTP and HTTPS
Command line arguments: sudo bettercap -debug
Notes:
- Confirmed on native builds (ruled out binary/library compatibility issues).
- Problem persists across different terminal emulators and UI security modes.
Steps to Reproduce
- Launch Bettercap: sudo bettercap.
- Enable the Web UI (HTTP or HTTPS): http-ui on.
- Access the Web UI in a browser.
- Toggle the Events Stream to OFF using the UI switch.
- Return to the terminal: typed characters are not echoed to the screen.
Expected behavior:
The local terminal REPL should remain visually synchronized and responsive, maintaining its prompt and echo state regardless of configuration changes made via the API.
Actual behavior:
The terminal REPL enters a state where it accepts input but provides no visual echo.
Source: bettercap/bettercap