# See the file "COPYING" in the main distribution directory for copyright. protocol analyzer Redis over TCP: parse originator with RESP::ClientMessages, parse responder with RESP::ServerMessages; import RESP; import Redis; import Zeek_Redis; export Redis::KnownCommand; export Zeek_Redis::ZeekServerData; on RESP::ClientData if ( Redis::is_set(self) ) -> event Redis::set_command($conn, Redis::make_set(self.command)); on RESP::ClientData if ( Redis::is_get(self) ) -> event Redis::get_command($conn, Redis::make_get(self.command).key); on RESP::ClientData if ( Redis::is_auth(self) ) -> event Redis::auth_command($conn, Redis::make_auth(self.command)); # All client data is a command on RESP::ClientData -> event Redis::command($conn, self.command); # Server data needs an event to attach request/responses on RESP::ServerData -> event Redis::reply($conn, Zeek_Redis::make_server_data(self));