zeek/testing/btest/scripts/base/protocols/redis/attributes.zeek
Evan Typanski 64443e5e5a Handle more Redis RESP3 protocol pieces
This passes the "minimum protocol version" along in the reply and adds
support for attributes, which were added relatively recently.
2025-07-01 14:14:15 -04:00

19 lines
614 B
Text

# @TEST-DOC: Test Redis protocol handling with replies with attributes
# @TEST-REQUIRES: have-spicy
#
# @TEST-EXEC: zeek -b -r $TRACES/redis/attr.pcap %INPUT >output
# @TEST-EXEC: btest-diff output
# @TEST-EXEC: btest-diff redis.log
# IMPORTANT: The test data was made synthetically, since real commands that
# return attributes may be version-specific. Real traffic would be better.
@load base/protocols/redis
event Redis::reply(c: connection, data: Redis::ReplyData)
{
if ( ! data?$attributes )
print "Got data:", data$value;
else
print "Got data:", data$value, "with attributes:", data$attributes;
}