mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
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.
This commit is contained in:
parent
b34d3ff2f0
commit
64443e5e5a
13 changed files with 115 additions and 30 deletions
19
testing/btest/scripts/base/protocols/redis/attributes.zeek
Normal file
19
testing/btest/scripts/base/protocols/redis/attributes.zeek
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue