Functions | |
| bytes|None | read_exact (socket.socket conn, int n) |
| None | send_frame (socket.socket conn, dict msg) |
| None | handle_client (socket.socket conn) |
| int | main () |
Fake UI per BastionGuard Secure Connection. Simula la UI reale sul protocollo wire (Unix socket + JSON length-prefixed): - accetta una connessione dal daemon sul socket default /tmp/bsd-daemon.sock - logga tutti i messaggi ricevuti - risponde automaticamente ai messaggi ask_rule con "allow once" Uso: python3 fake_ui.py [SOCKET_PATH] Utile per: - testare il daemon senza compilare la UI gtkmm - debuggare modifiche al protocollo - smoke test di CI
| None handle_client | ( | socket.socket | conn | ) |
Definition at line 39 of file fake_ui.py.
References read_exact(), and send_frame().
Referenced by main().
| int main | ( | void | ) |
Definition at line 80 of file fake_ui.py.
References handle_client(), and main().
Referenced by main().
| bytes | None read_exact | ( | socket.socket | conn, |
| int | n ) |
Definition at line 24 of file fake_ui.py.
Referenced by handle_client().
| None send_frame | ( | socket.socket | conn, |
| dict | msg ) |
Definition at line 34 of file fake_ui.py.
Referenced by handle_client().