zeek/src/analyzer/protocol/redis/resp.evt
Evan Typanski d5b121db14 spicy-redis: Cleanup scripts and tests
- Recomputes checksums for pcaps to keep clean
- Removes some tests that had big pcaps or weren't necessary
- Cleans up scripting names and minor points
- Comments out Spicy code that causes a build failure now with a TODO to
  uncomment it
2025-05-27 09:29:13 -04:00

21 lines
907 B
Text

# 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));