diff --git a/.typos.toml b/.typos.toml index 508f343d53..91102d52d5 100644 --- a/.typos.toml +++ b/.typos.toml @@ -30,6 +30,8 @@ extend-ignore-re = [ "ot->Yield\\(\\)->InternalType\\(\\)", "switch \\( ot \\)", "\\(ZAMOpType ot\\)", + "exat", # Redis expire at + "EXAT", # News stuff "SupressWeirds.*deprecated", diff --git a/CHANGES b/CHANGES index 123fd7e368..5731b95c4e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,44 @@ +8.0.0-dev.227 | 2025-05-27 10:18:49 -0400 + + * spicy-redis: Separate error replies from success (Evan Typanski, Corelight) + + * spicy-redis: Cleanup scripts and tests (Evan Typanski, Corelight) + + - 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 + + * spciy-redis: Bring Redis analyzer into Zeek proper (Evan Typanski, Corelight) + + * spicy-redis: Abort parsing if server data comes first (Evan Typanski, Corelight) + + Redis seems to only want client data first to request server data. The + DPD signature seems to pick up on some cases where server data comes + first, but is otherwise "valid" RESP. See if this helps lower FP rates. + + * spicy-redis: Add recursion depth to server data (Evan Typanski, Corelight) + + * spicy-redis: Make client data only accept bulk strings (Evan Typanski, Corelight) + + * spicy-redis: Add dpd signature and clean pcaps (Evan Typanski, Corelight) + + * spicy-redis: Add some commands and touch up parsing (Evan Typanski, Corelight) + + * spicy-redis: Add some script logic for logging (Evan Typanski, Corelight) + + * spicy-redis: Separate client/server (Evan Typanski, Corelight) + + This makes the parser more official and splits the client/server out + from each other. + + * spicy-redis: Touchup logging and Spicy issues (Evan Typanski, Corelight) + + * spicy-redis: Add synchronization and pipeline support (Evan Typanski, Corelight) + + * spicy-redis: Begin Spicy Redis analyzer (Evan Typanski, Corelight) + 8.0.0-dev.209 | 2025-05-26 16:08:44 +0200 * btest: Add test for Cluster::hello zero-timestamp (Arne Welzel, Corelight) diff --git a/NEWS b/NEWS index c713bcb14a..ddf4146c8c 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,17 @@ New Functionality const std::string& topic, zeek::cluster::detail::Event& event); +- Zeek now includes the Redis protocol analyzer from the evantypanski/spicy-redis + project (https://github.com/evantypanski/spicy-redis). This analyzer is enabled + by default. This analyzer logs Redis commands and their associated replies in + ``redis.log``. + + To disable the analyzer in case of issues, use the following snippet: + + redef Analyzer::disabled_analyzers += { + Analyzer::ANALYZER_REDIS, + }; + Changed Functionality --------------------- diff --git a/VERSION b/VERSION index 8b5d41b527..88f4ccd375 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.0-dev.209 +8.0.0-dev.227 diff --git a/scripts/base/init-default.zeek b/scripts/base/init-default.zeek index 90ccaf3445..c96307ab08 100644 --- a/scripts/base/init-default.zeek +++ b/scripts/base/init-default.zeek @@ -72,6 +72,7 @@ @load base/protocols/quic @load base/protocols/radius @load base/protocols/rdp +@load base/protocols/redis @load base/protocols/rfb @load base/protocols/sip @load base/protocols/snmp diff --git a/scripts/base/protocols/redis/__load__.zeek b/scripts/base/protocols/redis/__load__.zeek new file mode 100644 index 0000000000..50715942cb --- /dev/null +++ b/scripts/base/protocols/redis/__load__.zeek @@ -0,0 +1,6 @@ +@if ( have_spicy_analyzers() ) +@load ./spicy-events +@load ./main + +@load-sigs ./dpd.sig +@endif diff --git a/scripts/base/protocols/redis/dpd.sig b/scripts/base/protocols/redis/dpd.sig new file mode 100644 index 0000000000..943ac339e7 --- /dev/null +++ b/scripts/base/protocols/redis/dpd.sig @@ -0,0 +1,14 @@ +signature resp-client { + ip-proto == tcp + payload /^.*\r\n/ + tcp-state originator + requires-reverse-signature resp-serialized-server + enable "Redis" +} + +signature resp-serialized-server { + ip-proto == tcp + payload /^([-+_,].*\r\n|[:$*#(!=%`~>][+-]?[0-9]+(\.[0-9]*)?\r\n)/ + tcp-state responder + enable "Redis" +} diff --git a/scripts/base/protocols/redis/main.zeek b/scripts/base/protocols/redis/main.zeek new file mode 100644 index 0000000000..ab917df8c9 --- /dev/null +++ b/scripts/base/protocols/redis/main.zeek @@ -0,0 +1,278 @@ +@load base/protocols/conn/removal-hooks +@load base/frameworks/signatures + +@load ./spicy-events + +module Redis; + +export { + ## Log stream identifier. + redef enum Log::ID += { LOG }; + + ## The ports to register Redis for. + const ports = {6379/tcp} &redef; + + ## Record type containing the column fields of the Redis log. + type Info: record { + ## Timestamp for when the activity happened. + ts: time &log; + ## Unique ID for the connection. + uid: string &log; + ## The connection's 4-tuple of endpoint addresses/ports. + id: conn_id &log; + ## The Redis command. + cmd: Command &log; + ## If the command was successful. Only set if the server responded. + success: bool &log &optional; + ## The reply for the command. + reply: ReplyData &log &optional; + }; + + ## A default logging policy hook for the stream. + global log_policy: Log::PolicyHook; + + global finalize_redis: Conn::RemovalHook; + + ## Which numbered commands should not expect a reply due to CLIENT REPLY commands. + ## These commands may simply skip one, or they may turn off replies then later + ## reenable them. Thus, the end of the interval is optional. + type NoReplyRange: record { + begin: count; + end: count &optional; + }; + + type State: record { + ## Pending commands. + pending: table[count] of Info; + ## Current command in the pending queue. + current_command: count &default=0; + ## Current reply in the pending queue. + current_reply: count &default=0; + ## Ranges where we do not expect a reply due to CLIENT REPLY commands. + ## Each range is one or two elements, one meaning it's unbounded, two meaning + ## it begins at one and ends at the second. + no_reply_ranges: vector of NoReplyRange; + ## We store if this analyzer had a violation to avoid logging if so. + ## This should not be super necessary, but worth a shot. + violation: bool &default=F; + }; + + # Redis specifically mentions 10k commands as a good pipelining threshold, so + # we'll piggyback on that. + option max_pending_commands = 10000; +} + +redef record connection += { + redis: Info &optional; + redis_state: State &optional; +}; + +redef likely_server_ports += {ports}; + +event zeek_init() &priority=5 + { + Log::create_stream(Redis::LOG, [$columns=Info, $path="redis", + $policy=log_policy]); + + Analyzer::register_for_ports(Analyzer::ANALYZER_REDIS, ports); + } + +event analyzer_violation_info(atype: AllAnalyzers::Tag, + info: AnalyzerViolationInfo) + { + if ( atype == Analyzer::ANALYZER_REDIS && info?$c && info$c?$redis_state ) + { + info$c$redis_state$violation = T; + } + } + +function new_redis_info(c: connection): Info + { + return Info($ts=network_time(), $uid=c$uid, $id=c$id); + } + +function make_new_state(c: connection) + { + local s: State; + c$redis_state = s; + Conn::register_removal_hook(c, finalize_redis); + } + +function set_state(c: connection, is_orig: bool) + { + if ( ! c?$redis_state ) + make_new_state(c); + + local current: count; + if ( is_orig ) + current = c$redis_state$current_command; + else + current = c$redis_state$current_reply; + + if ( current !in c$redis_state$pending ) + c$redis_state$pending[current] = new_redis_info(c); + + c$redis = c$redis_state$pending[current]; + } + +## Returns whether the last "no reply" interval is not still open. +function is_last_interval_closed(c: connection): bool + { + return |c$redis_state$no_reply_ranges| == 0 || + c$redis_state$no_reply_ranges[-1]?$end; + } + +event Redis::command(c: connection, cmd: Command) + { + if ( ! c?$redis_state ) + make_new_state(c); + + if ( max_pending_commands > 0 + && |c$redis_state$pending| > max_pending_commands ) + { + Reporter::conn_weird("Redis_excessive_pipelining", c); + # Delete the current state and restart later. We'll be in a weird state, but + # really we want to abort. I don't quite get how to register this as a + # violation. :) + delete c$redis_state; + return; + } + + ++c$redis_state$current_command; + # CLIENT commands can skip a number of replies and may be used with + # pipelining. We need special logic in order to track the command/reply + # pairs. + if ( cmd?$known && cmd$known == KnownCommand_CLIENT ) + { + # All 3 CLIENT commands we care about have 3 elements + if ( |cmd$raw| == 3 ) + { + if ( to_lower(cmd$raw[2]) == "on" ) + { + # If the last range is open, close it here. Otherwise, noop + if ( |c$redis_state$no_reply_ranges| > 0 ) + { + local range = c$redis_state$no_reply_ranges[-1]; + if ( ! range?$end ) + { + range$end = c$redis_state$current_command; + } + } + } + if ( to_lower(cmd$raw[2]) == "off" ) + { + # Only add a new interval if the last one is closed + if ( is_last_interval_closed(c) ) + { + c$redis_state$no_reply_ranges += NoReplyRange( + $begin=c$redis_state$current_command); + } + } + if ( to_lower(cmd$raw[2]) == "skip" ) + { + if ( is_last_interval_closed(c) ) + # It skips this one and the next one + c$redis_state$no_reply_ranges += NoReplyRange( + $begin=c$redis_state$current_command, $end=c$redis_state$current_command + 2); + } + } + } + set_state(c, T); + + c$redis$cmd = cmd; + } + +## Gets the next reply number based on a connection. This is necessary since +## some replies may have been skipped. +function reply_num(c: connection): count + { + local resp_num = c$redis_state$current_reply + 1; + for ( i in c$redis_state$no_reply_ranges ) + { + local range = c$redis_state$no_reply_ranges[i]; + if ( ! range?$end && resp_num > range$begin ) + { } # TODO: This is necessary if not using pipelining + if ( range?$end && resp_num >= range$begin && resp_num < range$end ) + return range$end; + } + + # Default: no disable/enable shenanigans + return resp_num; + } + +# Logs up to and including the last seen command from the last reply +function log_from(c: connection, previous_reply_num: count) + { + # Log each of the pending replies to this point - we will not go + # back. + while ( previous_reply_num < c$redis_state$current_reply ) + { + if ( previous_reply_num == 0 ) + { + ++previous_reply_num; + next; + } + + if ( previous_reply_num in c$redis_state$pending && + c$redis_state$pending[previous_reply_num]?$cmd ) + { + Log::write(Redis::LOG, c$redis_state$pending[previous_reply_num]); + delete c$redis_state$pending[previous_reply_num]; + } + previous_reply_num += 1; + } + # Log this one if we have the command and reply + if ( c$redis?$cmd ) + { + Log::write(Redis::LOG, c$redis); + delete c$redis_state$pending[c$redis_state$current_reply]; + } + } + +event Redis::reply(c: connection, data: ReplyData) + { + if ( ! c?$redis_state ) + make_new_state(c); + + local previous_reply_num = c$redis_state$current_reply; + c$redis_state$current_reply = reply_num(c); + set_state(c, F); + + c$redis$reply = data; + c$redis$success = T; + log_from(c, previous_reply_num); + } + +event Redis::error(c: connection, data: ReplyData) + { + if ( ! c?$redis_state ) + make_new_state(c); + + local previous_reply_num = c$redis_state$current_reply; + c$redis_state$current_reply = reply_num(c); + set_state(c, F); + + c$redis$reply = data; + c$redis$success = F; + log_from(c, previous_reply_num); + } + +hook finalize_redis(c: connection) + { + if ( c$redis_state$violation ) + { + # If there's a violation, don't log the remaining parts, just return. + return; + } + # Flush all pending but incomplete command/reply pairs. + if ( c?$redis_state && c$redis_state$current_reply != 0 ) + { + for ( r, info in c$redis_state$pending ) + { + # We don't use pending elements at index 0. + if ( r == 0 ) + next; + Log::write(Redis::LOG, info); + } + } + } diff --git a/scripts/base/protocols/redis/spicy-events.zeek b/scripts/base/protocols/redis/spicy-events.zeek new file mode 100644 index 0000000000..ad9a500f18 --- /dev/null +++ b/scripts/base/protocols/redis/spicy-events.zeek @@ -0,0 +1,103 @@ +##! Events and records generated by the Redis analyzer. + +module Redis; + +export { + ## The Redis SET command. + type SetCommand: record { + ## The key the SET command is setting. + key: string &log; + ## The value the SET command is setting key to. + value: string &log; + ## If NX is set -- only set the key if it does not exist. + nx: bool; + ## If XX is set -- only set the key if it already exists. + xx: bool; + ## If GET is set -- return the old string stored at key. + get: bool; + ## EX option -- set the specified expire time, in seconds. + ex: count &optional; + ## PX option -- set the specified expire time, in milliseconds. + px: count &optional; + ## EXAT option-- set the specified Unix time at which the key will + ## expire, in seconds. + exat: count &optional; + ## PXAT option -- set the specified Unix time at which the key will + ## expire, in milliseconds. + pxat: count &optional; + ## If KEEPTTL is set -- retain the time to live associated with the key. + keep_ttl: bool; + }; + + ## The Redis AUTH command. + type AuthCommand: record { + ## The username getting authenticated. + username: string &optional; + ## The password authenticated with. + password: string; + }; + + ## A generic Redis command from the client. + type Command: record { + ## The raw command, exactly as parsed + raw: vector of string; + ## The first element of the command. Some commands are two strings, meaning + ## this is inaccurate for those cases. + name: string &log; + ## The key, if this command is known to have a key + key: string &log &optional; + ## The value, if this command is known to have a value + value: string &log &optional; + ## The command in an enum if it was known + known: KnownCommand &optional; + }; + + ## A generic Redis reply from the client. + type ReplyData: record { + value: string &log &optional; + }; +} + +## Generated for Redis SET commands sent to the Redis server. +## +## c: The connection. +## +## command: The SET command sent to the server and its data. +global set_command: event(c: connection, command: SetCommand); + +## Generated for Redis GET commands sent to the Redis server. +## +## c: The connection. +## +## command: The GET command sent to the server and its data. +global get_command: event(c: connection, key: string); + +## Generated for Redis AUTH commands sent to the Redis server. +## +## c: The connection. +## +## command: The AUTH command sent to the server and its data. +global auth_command: event(c: connection, command: AuthCommand); + +## Generated for every command sent by the client to the Redis server. +## +## c: The connection. +## +## cmd: The command sent to the server. +global command: event(c: connection, cmd: Command); + +## Generated for every successful response sent by the Redis server to the +## client. +## +## c: The connection. +## +## data: The server data sent to the client. +global reply: event(c: connection, data: ReplyData); + +## Generated for every error response sent by the Redis server to the +## client. +## +## c: The connection. +## +## data: The server data sent to the client. +global error: event(c: connection, data: ReplyData); diff --git a/src/analyzer/protocol/CMakeLists.txt b/src/analyzer/protocol/CMakeLists.txt index 82cfb58b47..df1686185c 100644 --- a/src/analyzer/protocol/CMakeLists.txt +++ b/src/analyzer/protocol/CMakeLists.txt @@ -32,6 +32,7 @@ add_subdirectory(postgresql) add_subdirectory(quic) add_subdirectory(radius) add_subdirectory(rdp) +add_subdirectory(redis) add_subdirectory(rfb) add_subdirectory(rpc) add_subdirectory(sip) diff --git a/src/analyzer/protocol/redis/CMakeLists.txt b/src/analyzer/protocol/redis/CMakeLists.txt new file mode 100644 index 0000000000..a063572728 --- /dev/null +++ b/src/analyzer/protocol/redis/CMakeLists.txt @@ -0,0 +1,5 @@ +spicy_add_analyzer( + NAME Redis + PACKAGE_NAME spicy-redis + SOURCES resp.spicy resp.evt redis.spicy + MODULES RESP Redis) diff --git a/src/analyzer/protocol/redis/redis.spicy b/src/analyzer/protocol/redis/redis.spicy new file mode 100644 index 0000000000..a2f23d4c6d --- /dev/null +++ b/src/analyzer/protocol/redis/redis.spicy @@ -0,0 +1,403 @@ +# See the file "COPYING" in the main distribution directory for copyright. +# +# Handle any Redis-specific "parsing" + +module Redis; + +import RESP; + +public type KnownCommand = enum { + APPEND, + AUTH, + BITCOUNT, + BITFIELD, + BITFIELD_RO, + BITOP, + BITPOS, + BLMPOP, + BLPOP, + BRPOP, + CLIENT, + COPY, + DECR, + DECRBY, + DEL, + DUMP, + EXISTS, + EXPIRE, + EXPIREAT, + EXPIRETIME, + GET, + GETBIT, + GETDEL, + GETEX, + GETRANGE, + GETSET, + HDEL, + HGET, + HSET, + INCR, + INCRBY, + KEYS, + MGET, + MOVE, + MSET, + PERSIST, + RENAME, + SET, + STRLEN, + TTL, + TYPE, +}; + +type Command = struct { + raw: vector; + name: bytes; + key: optional; + value: optional; + known: optional; +}; + +# This just assumes all elements in the array is a bulk string and puts them in a vector +public function make_command(command: RESP::ClientData): Command { + if (command?.multibulk) + return bulk_command(command); + else + return inline_command(command); +} + +public function bulk_command(command: RESP::ClientData): Command { + local v: vector; + for (ele in command.multibulk.elements) { + v.push_back(ele.content); + } + return parse_command(v); +} + +public function inline_command(command: RESP::ClientData): Command { + # Only call this if it's inline :) + assert command?.inline; + + local tokenized: vector; + local it = command.inline.at(0); + # Redis whitespace characters are null, tab, LF, CR, and space + local whitespace = set(0, 9, 10, 13, 32); + # Note: this logic is a bit different from Redis. Hopefully it doesn't matter + while (True) { + while (it != end(command.inline) && ((*it) in whitespace)) + it++; + + # Get a token + local start = it; + if (it != end(command.inline)) { + local double_quotes = False; + local single_quotes = False; + local done = False; + while (!done) { + if (double_quotes) { + if (*it == '\' && it + 1 != end(command.inline) && *(it + 1) == '"') { + # Skip one, then later we skip another + it++; + } else if (*it == '"') { + double_quotes = False; + } + + it++; + } else if (single_quotes) { + if (*it == '\' && it + 1 != end(command.inline) && *(it + 1) == ''') { + # Skip one, then later we skip another + it++; + } else if (*it == ''') { + single_quotes = False; + } + + it++; + } else { + if (it != end(command.inline)) { + switch (*it) { + case '"': double_quotes = True; + case ''': single_quotes = True; + default: { + if ((*it) in whitespace) + done = True; + } + } + + if (!done) + it++; + } + } + + if (it == end(command.inline)) + done = True; + } + } else + break; + + tokenized.push_back(command.inline.sub(start, it)); + } + return parse_command(tokenized); +} + +# Parses the vector of bytes to get a Command object +function parse_command(raw: vector): Command { + assert |raw| >= 1; + local cmd = command_from(raw[0]); + local parsed: Command = [$raw = raw, $name = raw[0], $key = Null, $value = Null, $known = cmd]; + if (!cmd) + return parsed; + + if (|raw| >= 2) { + switch (*cmd) { + case KnownCommand::KEYS: + parsed.key = raw[1]; + case KnownCommand::APPEND, + KnownCommand::BITCOUNT, + KnownCommand::BITFIELD, + KnownCommand::BITFIELD_RO, + KnownCommand::BITPOS, + KnownCommand::BLPOP, + KnownCommand::BRPOP, + KnownCommand::COPY, + KnownCommand::DECR, + KnownCommand::DECRBY, + KnownCommand::DEL, + KnownCommand::DUMP, + KnownCommand::EXISTS, + KnownCommand::EXPIRE, + KnownCommand::EXPIREAT, + KnownCommand::EXPIRETIME, + KnownCommand::GET, + KnownCommand::GETBIT, + KnownCommand::GETDEL, + KnownCommand::GETEX, + KnownCommand::GETRANGE, + KnownCommand::GETSET, + KnownCommand::HDEL, + KnownCommand::HGET, + KnownCommand::HSET, + KnownCommand::INCR, + KnownCommand::INCRBY, + KnownCommand::MGET, + KnownCommand::MOVE, + KnownCommand::MSET, + KnownCommand::PERSIST, + KnownCommand::RENAME, + KnownCommand::SET, + KnownCommand::STRLEN, + KnownCommand::TTL, + KnownCommand::TYPE: + parsed.key = raw[1]; + default: (); + } + } + + if (|raw| >= 3) { + switch (*cmd) { + case KnownCommand::SET, + KnownCommand::APPEND, + KnownCommand::DECRBY, + KnownCommand::EXPIRE, + KnownCommand::EXPIREAT, + KnownCommand::GETBIT, + KnownCommand::GETSET, + KnownCommand::HDEL, + KnownCommand::HGET, + KnownCommand::INCRBY, + KnownCommand::MOVE, + KnownCommand::MSET, + KnownCommand::RENAME: + parsed.value = raw[2]; + # Op first, destination second, then a list of keys. Just log dest + case KnownCommand::BITOP: parsed.key = raw[2]; + default: (); + } + } + + if (|raw| >= 4) { + switch (*cmd) { + # timeout, numkeys, then key + case KnownCommand::BLMPOP: parsed.key = raw[3]; + default: (); + } + } + + return parsed; +} + +function command_from(cmd_bytes: bytes): optional { + local cmd: optional = Null; + switch (cmd_bytes.lower()) { + case b"set": cmd = KnownCommand::SET; + case b"append": cmd = KnownCommand::APPEND; + case b"auth": cmd = KnownCommand::AUTH; + case b"bitcount": cmd = KnownCommand::BITCOUNT; + case b"bitfield": cmd = KnownCommand::BITFIELD; + case b"bitfield_ro": cmd = KnownCommand::BITFIELD_RO; + case b"bitop": cmd = KnownCommand::BITOP; + case b"bitpos": cmd = KnownCommand::BITPOS; + case b"blmpop": cmd = KnownCommand::BLMPOP; + case b"blpop": cmd = KnownCommand::BLPOP; + case b"brpop": cmd = KnownCommand::BRPOP; + case b"client": cmd = KnownCommand::CLIENT; + case b"copy": cmd = KnownCommand::COPY; + case b"decr": cmd = KnownCommand::DECR; + case b"decrby": cmd = KnownCommand::DECRBY; + case b"del": cmd = KnownCommand::DEL; + case b"dump": cmd = KnownCommand::DUMP; + case b"exists": cmd = KnownCommand::EXISTS; + case b"expire": cmd = KnownCommand::EXPIRE; + case b"expireat": cmd = KnownCommand::EXPIREAT; + case b"expiretime": cmd = KnownCommand::EXPIRETIME; + case b"expiretime": cmd = KnownCommand::EXPIRETIME; + case b"get": cmd = KnownCommand::GET; + case b"getbit": cmd = KnownCommand::GETBIT; + case b"getdel": cmd = KnownCommand::GETDEL; + case b"getex": cmd = KnownCommand::GETEX; + case b"getrange": cmd = KnownCommand::GETRANGE; + case b"getset": cmd = KnownCommand::GETSET; + case b"hdel": cmd = KnownCommand::HDEL; + case b"hget": cmd = KnownCommand::HGET; + case b"hset": cmd = KnownCommand::HSET; + case b"incr": cmd = KnownCommand::INCR; + case b"incrby": cmd = KnownCommand::INCRBY; + case b"keys": cmd = KnownCommand::KEYS; + case b"mget": cmd = KnownCommand::MGET; + case b"move": cmd = KnownCommand::MOVE; + case b"mset": cmd = KnownCommand::MSET; + case b"persist": cmd = KnownCommand::PERSIST; + case b"rename": cmd = KnownCommand::RENAME; + case b"strlen": cmd = KnownCommand::STRLEN; + case b"ttl": cmd = KnownCommand::TTL; + case b"type": cmd = KnownCommand::TYPE; + default: cmd = Null; + } + + return cmd; +} + +type Set = struct { + key: bytes; + value: bytes; + nx: bool &default=False; + xx: bool &default=False; + get: bool &default=False; + ex: optional &default=Null; + px: optional &default=Null; + exat: optional &default=Null; + pxat: optional &default=Null; + keep_ttl: bool &default=False; +}; + +public function make_set(command: Command): Set { + assert |command.raw| >= 3 : "Must have at least 3 elements in SET"; + assert command.key : "SET must validate a key"; + assert command.value : "SET must validate a value"; + local parsed: Set = [$key = *command.key, $value = *command.value]; + local i = 3; + while (i < |command.raw|) { + switch (command.raw[i].lower()) { + case b"nx": parsed.nx = True; + case b"xx": parsed.xx = True; + case b"get": parsed.get = True; + case b"ex": { + ++i; + if (i >= |command.raw|) + break; + parsed.ex = command.raw[i].to_uint(); + } + case b"px": { + ++i; + if (i >= |command.raw|) + break; + parsed.px = command.raw[i].to_uint(); + } + case b"exat": { + ++i; + if (i >= |command.raw|) + break; + parsed.exat = command.raw[i].to_uint(); + } + case b"pxat": { + ++i; + if (i >= |command.raw|) + break; + parsed.pxat = command.raw[i].to_uint(); + } + case b"keepttl": parsed.keep_ttl = True; + default: (); + } + + ++i; + } + return parsed; +} + +public function is_set(data: RESP::ClientData): bool { + return data.command.known && *(data.command.known) == KnownCommand::SET && data.command.key && data.command.value; +} + +type Get = struct { + key: bytes; +}; + +public function make_get(command: Command): Get { + assert command.key : "GET must validate a key"; + return [$key = *command.key]; +} + +public function is_get(data: RESP::ClientData): bool { + return data.command.known && *(data.command.known) == KnownCommand::GET && |data.command.raw| >= 2; +} + +type Auth = struct { + username: optional; + password: bytes; +}; + +public function make_auth(command: Command): Auth { + assert |command.raw| >= 2 : "AUTH must have arguments"; + if (|command.raw| == 2) { + return [$username = Null, $password = command.raw[1]]; + } + + return [$username = command.raw[1], $password = command.raw[2]]; +} + +public function is_auth(data: RESP::ClientData): bool { + return data.command.known && *(data.command.known) == KnownCommand::AUTH && |data.command.raw| >= 2; +} + +type ReplyData = struct { + value: optional; +}; + +public function is_err(server_data: RESP::ServerData): bool { + return server_data.data?.simple_error || server_data.data?.bulk_error; +} + +function bulk_string_content(bulk: RESP::BulkString): bytes { + if (bulk?.content) + return bulk.content; + else + return b""; +} + +# Gets the server reply in a simpler form +public function make_server_reply(data: RESP::ServerData): ReplyData { + local res: ReplyData = [$value = Null]; + if (data.data?.simple_error) + res.value = data.data.simple_error.content; + else if (data.data?.bulk_error) + res.value = bulk_string_content(data.data.bulk_error); + else if (data.data?.simple_string) + res.value = data.data.simple_string.content; + else if (data.data?.bulk_string) + res.value = bulk_string_content(data.data.bulk_string); + else if (data.data?.verbatim_string) + res.value = bulk_string_content(data.data.verbatim_string); + else if (data.data?.boolean) + res.value = data.data.boolean.val ? b"T" : b"F"; + + return res; +} diff --git a/src/analyzer/protocol/redis/resp.evt b/src/analyzer/protocol/redis/resp.evt new file mode 100644 index 0000000000..f67f8fbc1c --- /dev/null +++ b/src/analyzer/protocol/redis/resp.evt @@ -0,0 +1,20 @@ +# 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; + +export Redis::KnownCommand; + +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); + +on RESP::ServerData if ( ! Redis::is_err(self) ) -> event Redis::reply($conn, Redis::make_server_reply(self)); +on RESP::ServerData if ( Redis::is_err(self) ) -> event Redis::error($conn, Redis::make_server_reply(self)); diff --git a/src/analyzer/protocol/redis/resp.spicy b/src/analyzer/protocol/redis/resp.spicy new file mode 100644 index 0000000000..3216fd6d9b --- /dev/null +++ b/src/analyzer/protocol/redis/resp.spicy @@ -0,0 +1,211 @@ +# See the file "COPYING" in the main distribution directory for copyright. + +module RESP; + +import Redis; + +import spicy; + +# Maximum size for parsing of certain fields. By restricting this we avoid +# exhausting main memory. +const MAX_SIZE = 1024 * 1024; +const MAX_RECURSION_DEPTH = 20; + +public type ClientMessages = unit { + # The context here refers to whether we saw client data first. It is a one-time switch, + # either we have seen client data or not. + %context = bool; + on %init { + *self.context() = True; + } + : ClientData[]; +}; + +public type ServerMessages = unit { + %context = bool; + on %init { + if (!*self.context()) { + throw "Server responses must come after a client request is seen"; + } + } + : (ServerData &synchronize)[]; +}; + +public type ClientData = unit { + on %init() { + self.start = self.input(); + } + + # Clients can only be an array or inline + ty: uint8 &convert=DataType($$) { + if (self.ty != DataType::ARRAY) { + # This is inline, so we need to reparse `ty` + self.set_input(self.start); + } + } + if (self.ty == DataType::ARRAY) { + multibulk: BulkStringArray; + } else { + inline: RedisBytes &max-size=1024; + }; + + var start: iterator; + var command: Redis::Command; + + on %done { + self.command = Redis::make_command(self); + } +}; + +type BulkStringArray = unit { + num_elements: RedisBytes &convert=$$.to_int(10) &requires=self.num_elements <= int64(MAX_SIZE); + # Null array is an array with elements unset. This is different from an empty array + elements: BulkStringWithTy[uint64(self.num_elements)]; +}; + +type BulkStringWithTy = unit { + # Need to consume the type here + : uint8 &requires=$$ == '$'; + + length: RedisBytes &convert=$$.to_int(10) &requires=self.length <= int64(MAX_SIZE); + # NullBulkString is a BulkString with content unset + content: bytes &size=uint64(self.length) if(self.length >= 0); + + # Consume last CLRF + : skip RedisBytes; +}; + +public type ServerData = unit { + %synchronize-after = b"\x0d\x0a"; + var depth: uint8& = new uint8; + data: Data(self.depth); +}; + +type Data = unit(depth: uint8&) { + %synchronize-after = b"\x0d\x0a"; + ty: uint8 &convert=DataType($$); + switch (self.ty) { + DataType::SIMPLE_STRING -> simple_string: SimpleString(False); + DataType::SIMPLE_ERROR -> simple_error: SimpleString(True); + DataType::INTEGER -> integer: Integer; + DataType::BULK_STRING -> bulk_string: BulkString(False); + DataType::ARRAY -> array: Array(depth); + DataType::NULL -> null: Null_; + DataType::BOOLEAN -> boolean: Boolean; + DataType::DOUBLE -> double: Double; + DataType::BIG_NUM -> big_num: BigNum; + DataType::BULK_ERROR -> bulk_error: BulkString(True); + # This can be a different type, but the docs also say: + # "Some client libraries may ignore the difference between this type and the string type" + # It just includes the encoding first in the content + DataType::VERBATIM_STRING -> verbatim_string: BulkString(False); + DataType::MAP -> map_: Map(depth); + DataType::SET -> set_: Set(depth); + # "Push events are encoded similarly to arrays, differing only in their + # first byte" - TODO: can probably make it more obvious, though + DataType::PUSH -> push: Array(depth); + }; + + on %init { + depth++; + if (*depth > MAX_RECURSION_DEPTH) + throw "exceeded max recursion depth"; + } + + on %done { + depth--; + } +}; + +type DataType = enum { + SIMPLE_STRING = '+', + SIMPLE_ERROR = '-', + INTEGER = ':', + BULK_STRING = '$', + ARRAY = '*', + NULL = '_', + BOOLEAN = '#', + DOUBLE = ',', + BIG_NUM = '(', + BULK_ERROR = '!', + VERBATIM_STRING = '=', + MAP = '%', + SET = '~', + PUSH = '>', +}; + +# Helper unit to extract bytes of some reasonable size so we do not exhaust mem. +type RedisBytes = unit { + data: bytes &until=b"\x0d\x0a" &max-size=MAX_SIZE; +} &convert=self.data; + +type SimpleString = unit(is_error: bool) { + content: RedisBytes; +}; + +type Integer = unit { + int: RedisBytes &convert=$$.to_int(10); +}; + +type BulkString = unit(is_error: bool) { + length: RedisBytes &convert=$$.to_int(10) &requires=self.length <= int64(MAX_SIZE); + # NullBulkString is a BulkString with content unset + content: bytes &size=uint64(self.length) if(self.length >= 0); + + # Consume last CLRF if not a null bulk string + : skip RedisBytes if(self.length >= 0); +}; + +type Array = unit(depth: uint8&) { + num_elements: RedisBytes &convert=$$.to_int(10) &requires=self.num_elements <= int64(MAX_SIZE); + # Null array is an array with elements unset. This is different from an empty array + elements: Data(depth)[uint64(self.num_elements)]; +}; + +type Null_ = unit { + # Still must consume CLRF + : skip RedisBytes; +}; + +type Boolean = unit { + val: uint8 &convert=$$ == 't'; + : skip RedisBytes; +}; + +type Double = unit { + val: RedisBytes &convert=$$.to_real(); +}; + +type BigNum = unit { + # Big num can be very big so leave it in bytes. + val: RedisBytes; +}; + +type Map = unit(depth: uint8&) { + num_elements: RedisBytes &convert=$$.to_uint(10); + # TODO: How can I make this into a map? Alternatively, how can I do this better? + raw_data: Data(depth)[self.num_elements * 2]; + + # TODO: This is broken. See https://github.com/zeek/spicy/issues/2061 + # var key_val_pairs: vector>; + # on raw_data { + # while (local i = 0; i < self.num_elements) { + # self.key_val_pairs.push_back(($$[i], $$[i + 1])); + # i += 2; + # } + # } +}; + +type Set = unit(depth: uint8&) { + num_elements: RedisBytes &convert=$$.to_uint(10) &requires=self.num_elements <= MAX_SIZE; + # TODO: This should be a set but doesn't go in the backed C++ set + elements: Data(depth)[self.num_elements]; +}; + +on ServerData::%done { + spicy::accept_input(); +} + +on ServerData::%error { + spicy::decline_input("error while parsing RESP server data"); +} diff --git a/testing/btest/Baseline/core.print-bpf-filters/output2 b/testing/btest/Baseline/core.print-bpf-filters/output2 index aa3b0f8410..e19cf7bb9f 100644 --- a/testing/btest/Baseline/core.print-bpf-filters/output2 +++ b/testing/btest/Baseline/core.print-bpf-filters/output2 @@ -46,6 +46,7 @@ 1 614 1 631 1 636 +1 6379 1 6666 1 6667 1 6668 @@ -66,8 +67,8 @@ 1 992 1 993 1 995 -75 and -74 or -75 port -47 tcp +76 and +75 or +76 port +48 tcp 28 udp diff --git a/testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log b/testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log index 37a23662ca..e13fb0109d 100644 --- a/testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log +++ b/testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log @@ -466,6 +466,9 @@ scripts/base/init-default.zeek scripts/base/protocols/rdp/__load__.zeek scripts/base/protocols/rdp/consts.zeek scripts/base/protocols/rdp/main.zeek + scripts/base/protocols/redis/__load__.zeek + scripts/base/protocols/redis/spicy-events.zeek + scripts/base/protocols/redis/main.zeek scripts/base/protocols/rfb/__load__.zeek scripts/base/protocols/rfb/main.zeek scripts/base/protocols/sip/__load__.zeek diff --git a/testing/btest/Baseline/coverage.find-bro-logs/out b/testing/btest/Baseline/coverage.find-bro-logs/out index 942ef6e082..702ee726df 100644 --- a/testing/btest/Baseline/coverage.find-bro-logs/out +++ b/testing/btest/Baseline/coverage.find-bro-logs/out @@ -46,6 +46,7 @@ print_log_path quic radius rdp +redis reporter rfb signatures diff --git a/testing/btest/Baseline/coverage.record-fields/out.default b/testing/btest/Baseline/coverage.record-fields/out.default index 3c4202ba28..99d951affc 100644 --- a/testing/btest/Baseline/coverage.record-fields/out.default +++ b/testing/btest/Baseline/coverage.record-fields/out.default @@ -593,6 +593,39 @@ connection { * ts: time, log=T, optional=F * uid: string, log=T, optional=F } + * redis: record Redis::Info, log=F, optional=T + Redis::Info { + * cmd: record Redis::Command, log=T, optional=F + Redis::Command { + * key: string, log=T, optional=T + * known: enum Redis::KnownCommand, log=F, optional=T + * name: string, log=T, optional=F + * raw: vector of string, log=F, optional=F + * value: string, log=T, optional=T + } + * id: record conn_id, log=T, optional=F + conn_id { ... } + * reply: record Redis::ReplyData, log=T, optional=T + Redis::ReplyData { + * value: string, log=T, optional=T + } + * success: bool, log=T, optional=T + * ts: time, log=T, optional=F + * uid: string, log=T, optional=F + } + * redis_state: record Redis::State, log=F, optional=T + Redis::State { + * current_command: count, log=F, optional=T + * current_reply: count, log=F, optional=T + * no_reply_ranges: vector of record Redis::NoReplyRange, log=F, optional=F + Redis::NoReplyRange { + * begin: count, log=F, optional=F + * end: count, log=F, optional=T + } + * pending: table[count] of record Redis::Info, log=F, optional=F + Redis::Info { ... } + * violation: bool, log=F, optional=T + } * removal_hooks: set[func], log=F, optional=T * resp: record endpoint, log=F, optional=F endpoint { ... } diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.almost-redis/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.almost-redis/redis.log new file mode 100644 index 0000000000..26d19c6821 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.almost-redis/redis.log @@ -0,0 +1,12 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 53099 127.0.0.1 6379 AUTH - - T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 53099 127.0.0.1 6379 PING - - T OK +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.auth/output b/testing/btest/Baseline/scripts.base.protocols.redis.auth/output new file mode 100644 index 0000000000..9a80b6a339 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.auth/output @@ -0,0 +1,13 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +AUTH +username: notauser +password: notapassword +Auth failed:, WRONGPASS invalid username-password pair or user is disabled. +AUTH +username: default +password: defaultpassword +Auth succeeded:, OK +AUTH +username: noone +password: password +Auth failed:, WRONGPASS invalid username-password pair or user is disabled. diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.bulk/output b/testing/btest/Baseline/scripts.base.protocols.redis.bulk/output new file mode 100644 index 0000000000..1ffdbd717b --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.bulk/output @@ -0,0 +1,1001 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +SET: Key0 Value0 +SET: Key1 Value1 +SET: Key2 Value2 +SET: Key3 Value3 +SET: Key4 Value4 +SET: Key5 Value5 +SET: Key6 Value6 +SET: Key7 Value7 +SET: Key8 Value8 +SET: Key9 Value9 +SET: Key10 Value10 +SET: Key11 Value11 +SET: Key12 Value12 +SET: Key13 Value13 +SET: Key14 Value14 +SET: Key15 Value15 +SET: Key16 Value16 +SET: Key17 Value17 +SET: Key18 Value18 +SET: Key19 Value19 +SET: Key20 Value20 +SET: Key21 Value21 +SET: Key22 Value22 +SET: Key23 Value23 +SET: Key24 Value24 +SET: Key25 Value25 +SET: Key26 Value26 +SET: Key27 Value27 +SET: Key28 Value28 +SET: Key29 Value29 +SET: Key30 Value30 +SET: Key31 Value31 +SET: Key32 Value32 +SET: Key33 Value33 +SET: Key34 Value34 +SET: Key35 Value35 +SET: Key36 Value36 +SET: Key37 Value37 +SET: Key38 Value38 +SET: Key39 Value39 +SET: Key40 Value40 +SET: Key41 Value41 +SET: Key42 Value42 +SET: Key43 Value43 +SET: Key44 Value44 +SET: Key45 Value45 +SET: Key46 Value46 +SET: Key47 Value47 +SET: Key48 Value48 +SET: Key49 Value49 +SET: Key50 Value50 +SET: Key51 Value51 +SET: Key52 Value52 +SET: Key53 Value53 +SET: Key54 Value54 +SET: Key55 Value55 +SET: Key56 Value56 +SET: Key57 Value57 +SET: Key58 Value58 +SET: Key59 Value59 +SET: Key60 Value60 +SET: Key61 Value61 +SET: Key62 Value62 +SET: Key63 Value63 +SET: Key64 Value64 +SET: Key65 Value65 +SET: Key66 Value66 +SET: Key67 Value67 +SET: Key68 Value68 +SET: Key69 Value69 +SET: Key70 Value70 +SET: Key71 Value71 +SET: Key72 Value72 +SET: Key73 Value73 +SET: Key74 Value74 +SET: Key75 Value75 +SET: Key76 Value76 +SET: Key77 Value77 +SET: Key78 Value78 +SET: Key79 Value79 +SET: Key80 Value80 +SET: Key81 Value81 +SET: Key82 Value82 +SET: Key83 Value83 +SET: Key84 Value84 +SET: Key85 Value85 +SET: Key86 Value86 +SET: Key87 Value87 +SET: Key88 Value88 +SET: Key89 Value89 +SET: Key90 Value90 +SET: Key91 Value91 +SET: Key92 Value92 +SET: Key93 Value93 +SET: Key94 Value94 +SET: Key95 Value95 +SET: Key96 Value96 +SET: Key97 Value97 +SET: Key98 Value98 +SET: Key99 Value99 +SET: Key100 Value100 +SET: Key101 Value101 +SET: Key102 Value102 +SET: Key103 Value103 +SET: Key104 Value104 +SET: Key105 Value105 +SET: Key106 Value106 +SET: Key107 Value107 +SET: Key108 Value108 +SET: Key109 Value109 +SET: Key110 Value110 +SET: Key111 Value111 +SET: Key112 Value112 +SET: Key113 Value113 +SET: Key114 Value114 +SET: Key115 Value115 +SET: Key116 Value116 +SET: Key117 Value117 +SET: Key118 Value118 +SET: Key119 Value119 +SET: Key120 Value120 +SET: Key121 Value121 +SET: Key122 Value122 +SET: Key123 Value123 +SET: Key124 Value124 +SET: Key125 Value125 +SET: Key126 Value126 +SET: Key127 Value127 +SET: Key128 Value128 +SET: Key129 Value129 +SET: Key130 Value130 +SET: Key131 Value131 +SET: Key132 Value132 +SET: Key133 Value133 +SET: Key134 Value134 +SET: Key135 Value135 +SET: Key136 Value136 +SET: Key137 Value137 +SET: Key138 Value138 +SET: Key139 Value139 +SET: Key140 Value140 +SET: Key141 Value141 +SET: Key142 Value142 +SET: Key143 Value143 +SET: Key144 Value144 +SET: Key145 Value145 +SET: Key146 Value146 +SET: Key147 Value147 +SET: Key148 Value148 +SET: Key149 Value149 +SET: Key150 Value150 +SET: Key151 Value151 +SET: Key152 Value152 +SET: Key153 Value153 +SET: Key154 Value154 +SET: Key155 Value155 +SET: Key156 Value156 +SET: Key157 Value157 +SET: Key158 Value158 +SET: Key159 Value159 +SET: Key160 Value160 +SET: Key161 Value161 +SET: Key162 Value162 +SET: Key163 Value163 +SET: Key164 Value164 +SET: Key165 Value165 +SET: Key166 Value166 +SET: Key167 Value167 +SET: Key168 Value168 +SET: Key169 Value169 +SET: Key170 Value170 +SET: Key171 Value171 +SET: Key172 Value172 +SET: Key173 Value173 +SET: Key174 Value174 +SET: Key175 Value175 +SET: Key176 Value176 +SET: Key177 Value177 +SET: Key178 Value178 +SET: Key179 Value179 +SET: Key180 Value180 +SET: Key181 Value181 +SET: Key182 Value182 +SET: Key183 Value183 +SET: Key184 Value184 +SET: Key185 Value185 +SET: Key186 Value186 +SET: Key187 Value187 +SET: Key188 Value188 +SET: Key189 Value189 +SET: Key190 Value190 +SET: Key191 Value191 +SET: Key192 Value192 +SET: Key193 Value193 +SET: Key194 Value194 +SET: Key195 Value195 +SET: Key196 Value196 +SET: Key197 Value197 +SET: Key198 Value198 +SET: Key199 Value199 +SET: Key200 Value200 +SET: Key201 Value201 +SET: Key202 Value202 +SET: Key203 Value203 +SET: Key204 Value204 +SET: Key205 Value205 +SET: Key206 Value206 +SET: Key207 Value207 +SET: Key208 Value208 +SET: Key209 Value209 +SET: Key210 Value210 +SET: Key211 Value211 +SET: Key212 Value212 +SET: Key213 Value213 +SET: Key214 Value214 +SET: Key215 Value215 +SET: Key216 Value216 +SET: Key217 Value217 +SET: Key218 Value218 +SET: Key219 Value219 +SET: Key220 Value220 +SET: Key221 Value221 +SET: Key222 Value222 +SET: Key223 Value223 +SET: Key224 Value224 +SET: Key225 Value225 +SET: Key226 Value226 +SET: Key227 Value227 +SET: Key228 Value228 +SET: Key229 Value229 +SET: Key230 Value230 +SET: Key231 Value231 +SET: Key232 Value232 +SET: Key233 Value233 +SET: Key234 Value234 +SET: Key235 Value235 +SET: Key236 Value236 +SET: Key237 Value237 +SET: Key238 Value238 +SET: Key239 Value239 +SET: Key240 Value240 +SET: Key241 Value241 +SET: Key242 Value242 +SET: Key243 Value243 +SET: Key244 Value244 +SET: Key245 Value245 +SET: Key246 Value246 +SET: Key247 Value247 +SET: Key248 Value248 +SET: Key249 Value249 +SET: Key250 Value250 +SET: Key251 Value251 +SET: Key252 Value252 +SET: Key253 Value253 +SET: Key254 Value254 +SET: Key255 Value255 +SET: Key256 Value256 +SET: Key257 Value257 +SET: Key258 Value258 +SET: Key259 Value259 +SET: Key260 Value260 +SET: Key261 Value261 +SET: Key262 Value262 +SET: Key263 Value263 +SET: Key264 Value264 +SET: Key265 Value265 +SET: Key266 Value266 +SET: Key267 Value267 +SET: Key268 Value268 +SET: Key269 Value269 +SET: Key270 Value270 +SET: Key271 Value271 +SET: Key272 Value272 +SET: Key273 Value273 +SET: Key274 Value274 +SET: Key275 Value275 +SET: Key276 Value276 +SET: Key277 Value277 +SET: Key278 Value278 +SET: Key279 Value279 +SET: Key280 Value280 +SET: Key281 Value281 +SET: Key282 Value282 +SET: Key283 Value283 +SET: Key284 Value284 +SET: Key285 Value285 +SET: Key286 Value286 +SET: Key287 Value287 +SET: Key288 Value288 +SET: Key289 Value289 +SET: Key290 Value290 +SET: Key291 Value291 +SET: Key292 Value292 +SET: Key293 Value293 +SET: Key294 Value294 +SET: Key295 Value295 +SET: Key296 Value296 +SET: Key297 Value297 +SET: Key298 Value298 +SET: Key299 Value299 +SET: Key300 Value300 +SET: Key301 Value301 +SET: Key302 Value302 +SET: Key303 Value303 +SET: Key304 Value304 +SET: Key305 Value305 +SET: Key306 Value306 +SET: Key307 Value307 +SET: Key308 Value308 +SET: Key309 Value309 +SET: Key310 Value310 +SET: Key311 Value311 +SET: Key312 Value312 +SET: Key313 Value313 +SET: Key314 Value314 +SET: Key315 Value315 +SET: Key316 Value316 +SET: Key317 Value317 +SET: Key318 Value318 +SET: Key319 Value319 +SET: Key320 Value320 +SET: Key321 Value321 +SET: Key322 Value322 +SET: Key323 Value323 +SET: Key324 Value324 +SET: Key325 Value325 +SET: Key326 Value326 +SET: Key327 Value327 +SET: Key328 Value328 +SET: Key329 Value329 +SET: Key330 Value330 +SET: Key331 Value331 +SET: Key332 Value332 +SET: Key333 Value333 +SET: Key334 Value334 +SET: Key335 Value335 +SET: Key336 Value336 +SET: Key337 Value337 +SET: Key338 Value338 +SET: Key339 Value339 +SET: Key340 Value340 +SET: Key341 Value341 +SET: Key342 Value342 +SET: Key343 Value343 +SET: Key344 Value344 +SET: Key345 Value345 +SET: Key346 Value346 +SET: Key347 Value347 +SET: Key348 Value348 +SET: Key349 Value349 +SET: Key350 Value350 +SET: Key351 Value351 +SET: Key352 Value352 +SET: Key353 Value353 +SET: Key354 Value354 +SET: Key355 Value355 +SET: Key356 Value356 +SET: Key357 Value357 +SET: Key358 Value358 +SET: Key359 Value359 +SET: Key360 Value360 +SET: Key361 Value361 +SET: Key362 Value362 +SET: Key363 Value363 +SET: Key364 Value364 +SET: Key365 Value365 +SET: Key366 Value366 +SET: Key367 Value367 +SET: Key368 Value368 +SET: Key369 Value369 +SET: Key370 Value370 +SET: Key371 Value371 +SET: Key372 Value372 +SET: Key373 Value373 +SET: Key374 Value374 +SET: Key375 Value375 +SET: Key376 Value376 +SET: Key377 Value377 +SET: Key378 Value378 +SET: Key379 Value379 +SET: Key380 Value380 +SET: Key381 Value381 +SET: Key382 Value382 +SET: Key383 Value383 +SET: Key384 Value384 +SET: Key385 Value385 +SET: Key386 Value386 +SET: Key387 Value387 +SET: Key388 Value388 +SET: Key389 Value389 +SET: Key390 Value390 +SET: Key391 Value391 +SET: Key392 Value392 +SET: Key393 Value393 +SET: Key394 Value394 +SET: Key395 Value395 +SET: Key396 Value396 +SET: Key397 Value397 +SET: Key398 Value398 +SET: Key399 Value399 +SET: Key400 Value400 +SET: Key401 Value401 +SET: Key402 Value402 +SET: Key403 Value403 +SET: Key404 Value404 +SET: Key405 Value405 +SET: Key406 Value406 +SET: Key407 Value407 +SET: Key408 Value408 +SET: Key409 Value409 +SET: Key410 Value410 +SET: Key411 Value411 +SET: Key412 Value412 +SET: Key413 Value413 +SET: Key414 Value414 +SET: Key415 Value415 +SET: Key416 Value416 +SET: Key417 Value417 +SET: Key418 Value418 +SET: Key419 Value419 +SET: Key420 Value420 +SET: Key421 Value421 +SET: Key422 Value422 +SET: Key423 Value423 +SET: Key424 Value424 +SET: Key425 Value425 +SET: Key426 Value426 +SET: Key427 Value427 +SET: Key428 Value428 +SET: Key429 Value429 +SET: Key430 Value430 +SET: Key431 Value431 +SET: Key432 Value432 +SET: Key433 Value433 +SET: Key434 Value434 +SET: Key435 Value435 +SET: Key436 Value436 +SET: Key437 Value437 +SET: Key438 Value438 +SET: Key439 Value439 +SET: Key440 Value440 +SET: Key441 Value441 +SET: Key442 Value442 +SET: Key443 Value443 +SET: Key444 Value444 +SET: Key445 Value445 +SET: Key446 Value446 +SET: Key447 Value447 +SET: Key448 Value448 +SET: Key449 Value449 +SET: Key450 Value450 +SET: Key451 Value451 +SET: Key452 Value452 +SET: Key453 Value453 +SET: Key454 Value454 +SET: Key455 Value455 +SET: Key456 Value456 +SET: Key457 Value457 +SET: Key458 Value458 +SET: Key459 Value459 +SET: Key460 Value460 +SET: Key461 Value461 +SET: Key462 Value462 +SET: Key463 Value463 +SET: Key464 Value464 +SET: Key465 Value465 +SET: Key466 Value466 +SET: Key467 Value467 +SET: Key468 Value468 +SET: Key469 Value469 +SET: Key470 Value470 +SET: Key471 Value471 +SET: Key472 Value472 +SET: Key473 Value473 +SET: Key474 Value474 +SET: Key475 Value475 +SET: Key476 Value476 +SET: Key477 Value477 +SET: Key478 Value478 +SET: Key479 Value479 +SET: Key480 Value480 +SET: Key481 Value481 +SET: Key482 Value482 +SET: Key483 Value483 +SET: Key484 Value484 +SET: Key485 Value485 +SET: Key486 Value486 +SET: Key487 Value487 +SET: Key488 Value488 +SET: Key489 Value489 +SET: Key490 Value490 +SET: Key491 Value491 +SET: Key492 Value492 +SET: Key493 Value493 +SET: Key494 Value494 +SET: Key495 Value495 +SET: Key496 Value496 +SET: Key497 Value497 +SET: Key498 Value498 +SET: Key499 Value499 +SET: Key500 Value500 +SET: Key501 Value501 +SET: Key502 Value502 +SET: Key503 Value503 +SET: Key504 Value504 +SET: Key505 Value505 +SET: Key506 Value506 +SET: Key507 Value507 +SET: Key508 Value508 +SET: Key509 Value509 +SET: Key510 Value510 +SET: Key511 Value511 +SET: Key512 Value512 +SET: Key513 Value513 +SET: Key514 Value514 +SET: Key515 Value515 +SET: Key516 Value516 +SET: Key517 Value517 +SET: Key518 Value518 +SET: Key519 Value519 +SET: Key520 Value520 +SET: Key521 Value521 +SET: Key522 Value522 +SET: Key523 Value523 +SET: Key524 Value524 +SET: Key525 Value525 +SET: Key526 Value526 +SET: Key527 Value527 +SET: Key528 Value528 +SET: Key529 Value529 +SET: Key530 Value530 +SET: Key531 Value531 +SET: Key532 Value532 +SET: Key533 Value533 +SET: Key534 Value534 +SET: Key535 Value535 +SET: Key536 Value536 +SET: Key537 Value537 +SET: Key538 Value538 +SET: Key539 Value539 +SET: Key540 Value540 +SET: Key541 Value541 +SET: Key542 Value542 +SET: Key543 Value543 +SET: Key544 Value544 +SET: Key545 Value545 +SET: Key546 Value546 +SET: Key547 Value547 +SET: Key548 Value548 +SET: Key549 Value549 +SET: Key550 Value550 +SET: Key551 Value551 +SET: Key552 Value552 +SET: Key553 Value553 +SET: Key554 Value554 +SET: Key555 Value555 +SET: Key556 Value556 +SET: Key557 Value557 +SET: Key558 Value558 +SET: Key559 Value559 +SET: Key560 Value560 +SET: Key561 Value561 +SET: Key562 Value562 +SET: Key563 Value563 +SET: Key564 Value564 +SET: Key565 Value565 +SET: Key566 Value566 +SET: Key567 Value567 +SET: Key568 Value568 +SET: Key569 Value569 +SET: Key570 Value570 +SET: Key571 Value571 +SET: Key572 Value572 +SET: Key573 Value573 +SET: Key574 Value574 +SET: Key575 Value575 +SET: Key576 Value576 +SET: Key577 Value577 +SET: Key578 Value578 +SET: Key579 Value579 +SET: Key580 Value580 +SET: Key581 Value581 +SET: Key582 Value582 +SET: Key583 Value583 +SET: Key584 Value584 +SET: Key585 Value585 +SET: Key586 Value586 +SET: Key587 Value587 +SET: Key588 Value588 +SET: Key589 Value589 +SET: Key590 Value590 +SET: Key591 Value591 +SET: Key592 Value592 +SET: Key593 Value593 +SET: Key594 Value594 +SET: Key595 Value595 +SET: Key596 Value596 +SET: Key597 Value597 +SET: Key598 Value598 +SET: Key599 Value599 +SET: Key600 Value600 +SET: Key601 Value601 +SET: Key602 Value602 +SET: Key603 Value603 +SET: Key604 Value604 +SET: Key605 Value605 +SET: Key606 Value606 +SET: Key607 Value607 +SET: Key608 Value608 +SET: Key609 Value609 +SET: Key610 Value610 +SET: Key611 Value611 +SET: Key612 Value612 +SET: Key613 Value613 +SET: Key614 Value614 +SET: Key615 Value615 +SET: Key616 Value616 +SET: Key617 Value617 +SET: Key618 Value618 +SET: Key619 Value619 +SET: Key620 Value620 +SET: Key621 Value621 +SET: Key622 Value622 +SET: Key623 Value623 +SET: Key624 Value624 +SET: Key625 Value625 +SET: Key626 Value626 +SET: Key627 Value627 +SET: Key628 Value628 +SET: Key629 Value629 +SET: Key630 Value630 +SET: Key631 Value631 +SET: Key632 Value632 +SET: Key633 Value633 +SET: Key634 Value634 +SET: Key635 Value635 +SET: Key636 Value636 +SET: Key637 Value637 +SET: Key638 Value638 +SET: Key639 Value639 +SET: Key640 Value640 +SET: Key641 Value641 +SET: Key642 Value642 +SET: Key643 Value643 +SET: Key644 Value644 +SET: Key645 Value645 +SET: Key646 Value646 +SET: Key647 Value647 +SET: Key648 Value648 +SET: Key649 Value649 +SET: Key650 Value650 +SET: Key651 Value651 +SET: Key652 Value652 +SET: Key653 Value653 +SET: Key654 Value654 +SET: Key655 Value655 +SET: Key656 Value656 +SET: Key657 Value657 +SET: Key658 Value658 +SET: Key659 Value659 +SET: Key660 Value660 +SET: Key661 Value661 +SET: Key662 Value662 +SET: Key663 Value663 +SET: Key664 Value664 +SET: Key665 Value665 +SET: Key666 Value666 +SET: Key667 Value667 +SET: Key668 Value668 +SET: Key669 Value669 +SET: Key670 Value670 +SET: Key671 Value671 +SET: Key672 Value672 +SET: Key673 Value673 +SET: Key674 Value674 +SET: Key675 Value675 +SET: Key676 Value676 +SET: Key677 Value677 +SET: Key678 Value678 +SET: Key679 Value679 +SET: Key680 Value680 +SET: Key681 Value681 +SET: Key682 Value682 +SET: Key683 Value683 +SET: Key684 Value684 +SET: Key685 Value685 +SET: Key686 Value686 +SET: Key687 Value687 +SET: Key688 Value688 +SET: Key689 Value689 +SET: Key690 Value690 +SET: Key691 Value691 +SET: Key692 Value692 +SET: Key693 Value693 +SET: Key694 Value694 +SET: Key695 Value695 +SET: Key696 Value696 +SET: Key697 Value697 +SET: Key698 Value698 +SET: Key699 Value699 +SET: Key700 Value700 +SET: Key701 Value701 +SET: Key702 Value702 +SET: Key703 Value703 +SET: Key704 Value704 +SET: Key705 Value705 +SET: Key706 Value706 +SET: Key707 Value707 +SET: Key708 Value708 +SET: Key709 Value709 +SET: Key710 Value710 +SET: Key711 Value711 +SET: Key712 Value712 +SET: Key713 Value713 +SET: Key714 Value714 +SET: Key715 Value715 +SET: Key716 Value716 +SET: Key717 Value717 +SET: Key718 Value718 +SET: Key719 Value719 +SET: Key720 Value720 +SET: Key721 Value721 +SET: Key722 Value722 +SET: Key723 Value723 +SET: Key724 Value724 +SET: Key725 Value725 +SET: Key726 Value726 +SET: Key727 Value727 +SET: Key728 Value728 +SET: Key729 Value729 +SET: Key730 Value730 +SET: Key731 Value731 +SET: Key732 Value732 +SET: Key733 Value733 +SET: Key734 Value734 +SET: Key735 Value735 +SET: Key736 Value736 +SET: Key737 Value737 +SET: Key738 Value738 +SET: Key739 Value739 +SET: Key740 Value740 +SET: Key741 Value741 +SET: Key742 Value742 +SET: Key743 Value743 +SET: Key744 Value744 +SET: Key745 Value745 +SET: Key746 Value746 +SET: Key747 Value747 +SET: Key748 Value748 +SET: Key749 Value749 +SET: Key750 Value750 +SET: Key751 Value751 +SET: Key752 Value752 +SET: Key753 Value753 +SET: Key754 Value754 +SET: Key755 Value755 +SET: Key756 Value756 +SET: Key757 Value757 +SET: Key758 Value758 +SET: Key759 Value759 +SET: Key760 Value760 +SET: Key761 Value761 +SET: Key762 Value762 +SET: Key763 Value763 +SET: Key764 Value764 +SET: Key765 Value765 +SET: Key766 Value766 +SET: Key767 Value767 +SET: Key768 Value768 +SET: Key769 Value769 +SET: Key770 Value770 +SET: Key771 Value771 +SET: Key772 Value772 +SET: Key773 Value773 +SET: Key774 Value774 +SET: Key775 Value775 +SET: Key776 Value776 +SET: Key777 Value777 +SET: Key778 Value778 +SET: Key779 Value779 +SET: Key780 Value780 +SET: Key781 Value781 +SET: Key782 Value782 +SET: Key783 Value783 +SET: Key784 Value784 +SET: Key785 Value785 +SET: Key786 Value786 +SET: Key787 Value787 +SET: Key788 Value788 +SET: Key789 Value789 +SET: Key790 Value790 +SET: Key791 Value791 +SET: Key792 Value792 +SET: Key793 Value793 +SET: Key794 Value794 +SET: Key795 Value795 +SET: Key796 Value796 +SET: Key797 Value797 +SET: Key798 Value798 +SET: Key799 Value799 +SET: Key800 Value800 +SET: Key801 Value801 +SET: Key802 Value802 +SET: Key803 Value803 +SET: Key804 Value804 +SET: Key805 Value805 +SET: Key806 Value806 +SET: Key807 Value807 +SET: Key808 Value808 +SET: Key809 Value809 +SET: Key810 Value810 +SET: Key811 Value811 +SET: Key812 Value812 +SET: Key813 Value813 +SET: Key814 Value814 +SET: Key815 Value815 +SET: Key816 Value816 +SET: Key817 Value817 +SET: Key818 Value818 +SET: Key819 Value819 +SET: Key820 Value820 +SET: Key821 Value821 +SET: Key822 Value822 +SET: Key823 Value823 +SET: Key824 Value824 +SET: Key825 Value825 +SET: Key826 Value826 +SET: Key827 Value827 +SET: Key828 Value828 +SET: Key829 Value829 +SET: Key830 Value830 +SET: Key831 Value831 +SET: Key832 Value832 +SET: Key833 Value833 +SET: Key834 Value834 +SET: Key835 Value835 +SET: Key836 Value836 +SET: Key837 Value837 +SET: Key838 Value838 +SET: Key839 Value839 +SET: Key840 Value840 +SET: Key841 Value841 +SET: Key842 Value842 +SET: Key843 Value843 +SET: Key844 Value844 +SET: Key845 Value845 +SET: Key846 Value846 +SET: Key847 Value847 +SET: Key848 Value848 +SET: Key849 Value849 +SET: Key850 Value850 +SET: Key851 Value851 +SET: Key852 Value852 +SET: Key853 Value853 +SET: Key854 Value854 +SET: Key855 Value855 +SET: Key856 Value856 +SET: Key857 Value857 +SET: Key858 Value858 +SET: Key859 Value859 +SET: Key860 Value860 +SET: Key861 Value861 +SET: Key862 Value862 +SET: Key863 Value863 +SET: Key864 Value864 +SET: Key865 Value865 +SET: Key866 Value866 +SET: Key867 Value867 +SET: Key868 Value868 +SET: Key869 Value869 +SET: Key870 Value870 +SET: Key871 Value871 +SET: Key872 Value872 +SET: Key873 Value873 +SET: Key874 Value874 +SET: Key875 Value875 +SET: Key876 Value876 +SET: Key877 Value877 +SET: Key878 Value878 +SET: Key879 Value879 +SET: Key880 Value880 +SET: Key881 Value881 +SET: Key882 Value882 +SET: Key883 Value883 +SET: Key884 Value884 +SET: Key885 Value885 +SET: Key886 Value886 +SET: Key887 Value887 +SET: Key888 Value888 +SET: Key889 Value889 +SET: Key890 Value890 +SET: Key891 Value891 +SET: Key892 Value892 +SET: Key893 Value893 +SET: Key894 Value894 +SET: Key895 Value895 +SET: Key896 Value896 +SET: Key897 Value897 +SET: Key898 Value898 +SET: Key899 Value899 +SET: Key900 Value900 +SET: Key901 Value901 +SET: Key902 Value902 +SET: Key903 Value903 +SET: Key904 Value904 +SET: Key905 Value905 +SET: Key906 Value906 +SET: Key907 Value907 +SET: Key908 Value908 +SET: Key909 Value909 +SET: Key910 Value910 +SET: Key911 Value911 +SET: Key912 Value912 +SET: Key913 Value913 +SET: Key914 Value914 +SET: Key915 Value915 +SET: Key916 Value916 +SET: Key917 Value917 +SET: Key918 Value918 +SET: Key919 Value919 +SET: Key920 Value920 +SET: Key921 Value921 +SET: Key922 Value922 +SET: Key923 Value923 +SET: Key924 Value924 +SET: Key925 Value925 +SET: Key926 Value926 +SET: Key927 Value927 +SET: Key928 Value928 +SET: Key929 Value929 +SET: Key930 Value930 +SET: Key931 Value931 +SET: Key932 Value932 +SET: Key933 Value933 +SET: Key934 Value934 +SET: Key935 Value935 +SET: Key936 Value936 +SET: Key937 Value937 +SET: Key938 Value938 +SET: Key939 Value939 +SET: Key940 Value940 +SET: Key941 Value941 +SET: Key942 Value942 +SET: Key943 Value943 +SET: Key944 Value944 +SET: Key945 Value945 +SET: Key946 Value946 +SET: Key947 Value947 +SET: Key948 Value948 +SET: Key949 Value949 +SET: Key950 Value950 +SET: Key951 Value951 +SET: Key952 Value952 +SET: Key953 Value953 +SET: Key954 Value954 +SET: Key955 Value955 +SET: Key956 Value956 +SET: Key957 Value957 +SET: Key958 Value958 +SET: Key959 Value959 +SET: Key960 Value960 +SET: Key961 Value961 +SET: Key962 Value962 +SET: Key963 Value963 +SET: Key964 Value964 +SET: Key965 Value965 +SET: Key966 Value966 +SET: Key967 Value967 +SET: Key968 Value968 +SET: Key969 Value969 +SET: Key970 Value970 +SET: Key971 Value971 +SET: Key972 Value972 +SET: Key973 Value973 +SET: Key974 Value974 +SET: Key975 Value975 +SET: Key976 Value976 +SET: Key977 Value977 +SET: Key978 Value978 +SET: Key979 Value979 +SET: Key980 Value980 +SET: Key981 Value981 +SET: Key982 Value982 +SET: Key983 Value983 +SET: Key984 Value984 +SET: Key985 Value985 +SET: Key986 Value986 +SET: Key987 Value987 +SET: Key988 Value988 +SET: Key989 Value989 +SET: Key990 Value990 +SET: Key991 Value991 +SET: Key992 Value992 +SET: Key993 Value993 +SET: Key994 Value994 +SET: Key995 Value995 +SET: Key996 Value996 +SET: Key997 Value997 +SET: Key998 Value998 +SET: Key999 Value999 diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.client-reply-off-2conn/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.client-reply-off-2conn/redis.log new file mode 100644 index 0000000000..2bda440ce4 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.client-reply-off-2conn/redis.log @@ -0,0 +1,16 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 61211 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX ClEkJM2Vm5giqnMf4h ::1 61212 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 61211 ::1 6379 CLIENT - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 61211 ::1 6379 PING - - - - +XXXXXXXXXX.XXXXXX ClEkJM2Vm5giqnMf4h ::1 61212 ::1 6379 CLIENT - - - - +XXXXXXXXXX.XXXXXX ClEkJM2Vm5giqnMf4h ::1 61212 ::1 6379 PING - - - - +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.client-reply-off/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.client-reply-off/redis.log new file mode 100644 index 0000000000..3490733b6e --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.client-reply-off/redis.log @@ -0,0 +1,18 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 CLIENT - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 PING - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 CLIENT - - T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 CLIENT - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 PING - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 60761 ::1 6379 PING - - T PONG +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.client-skip-while-off/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.client-skip-while-off/redis.log new file mode 100644 index 0000000000..3458ce1040 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.client-skip-while-off/redis.log @@ -0,0 +1,17 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56348 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56348 ::1 6379 CLIENT - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56348 ::1 6379 PING - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56348 ::1 6379 CLIENT - - - - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56348 ::1 6379 CLIENT - - T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56348 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56348 ::1 6379 PING - - T PONG +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/conn.log b/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/conn.log new file mode 100644 index 0000000000..5453770cd6 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/conn.log @@ -0,0 +1,11 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path conn +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto service duration orig_bytes resp_bytes conn_state local_orig local_resp missed_bytes history orig_pkts orig_ip_bytes resp_pkts resp_ip_bytes tunnel_parents ip_proto +#types time string addr port addr port enum string interval count count string bool bool count string count count count count set[string] count +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 tcp redis 13.539827 18106 928 OTH T F 0 DdA 316 34538 158 9144 - 6 +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/output b/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/output new file mode 100644 index 0000000000..c5919bdf82 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/output @@ -0,0 +1,3 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +Factorial of 100 is 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 +Found 152 SET commands diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/redis.log new file mode 100644 index 0000000000..331085d4bc --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.django-cloud/redis.log @@ -0,0 +1,168 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 GET :1:factorial_3 - T 6 +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 GET :1:factorial_3 - T 6 +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 GET :1:factorial_50 - T (empty) +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_1 1 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_2 2 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_3 6 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_4 24 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_5 120 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_6 720 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_7 5040 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_8 40320 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_9 362880 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_10 3628800 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_11 39916800 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_12 479001600 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_13 6227020800 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_14 87178291200 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_15 1307674368000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_16 20922789888000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_17 355687428096000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_18 6402373705728000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_19 121645100408832000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_20 2432902008176640000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_21 51090942171709440000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_22 1124000727777607680000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_23 25852016738884976640000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_24 620448401733239439360000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_25 15511210043330985984000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_26 403291461126605635584000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_27 10888869450418352160768000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_28 304888344611713860501504000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_29 8841761993739701954543616000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_30 265252859812191058636308480000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_31 8222838654177922817725562880000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_32 263130836933693530167218012160000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_33 8683317618811886495518194401280000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_34 295232799039604140847618609643520000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_35 10333147966386144929666651337523200000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_36 371993326789901217467999448150835200000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_37 13763753091226345046315979581580902400000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_38 523022617466601111760007224100074291200000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_39 20397882081197443358640281739902897356800000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_40 815915283247897734345611269596115894272000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_41 33452526613163807108170062053440751665152000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_42 1405006117752879898543142606244511569936384000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_43 60415263063373835637355132068513997507264512000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_44 2658271574788448768043625811014615890319638528000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_45 119622220865480194561963161495657715064383733760000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_46 5502622159812088949850305428800254892961651752960000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_47 258623241511168180642964355153611979969197632389120000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_48 12413915592536072670862289047373375038521486354677760000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_49 608281864034267560872252163321295376887552831379210240000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_50 30414093201713378043612608166064768844377641568960512000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_50 30414093201713378043612608166064768844377641568960512000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 GET :1:factorial_50 - T 30414093201713378043612608166064768844377641568960512000000000000 +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 GET :1:factorial_50 - T 30414093201713378043612608166064768844377641568960512000000000000 +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 GET :1:factorial_100 - T (empty) +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_1 1 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_2 2 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_3 6 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_4 24 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_5 120 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_6 720 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_7 5040 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_8 40320 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_9 362880 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_10 3628800 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_11 39916800 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_12 479001600 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_13 6227020800 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_14 87178291200 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_15 1307674368000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_16 20922789888000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_17 355687428096000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_18 6402373705728000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_19 121645100408832000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_20 2432902008176640000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_21 51090942171709440000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_22 1124000727777607680000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_23 25852016738884976640000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_24 620448401733239439360000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_25 15511210043330985984000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_26 403291461126605635584000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_27 10888869450418352160768000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_28 304888344611713860501504000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_29 8841761993739701954543616000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_30 265252859812191058636308480000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_31 8222838654177922817725562880000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_32 263130836933693530167218012160000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_33 8683317618811886495518194401280000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_34 295232799039604140847618609643520000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_35 10333147966386144929666651337523200000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_36 371993326789901217467999448150835200000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_37 13763753091226345046315979581580902400000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_38 523022617466601111760007224100074291200000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_39 20397882081197443358640281739902897356800000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_40 815915283247897734345611269596115894272000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_41 33452526613163807108170062053440751665152000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_42 1405006117752879898543142606244511569936384000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_43 60415263063373835637355132068513997507264512000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_44 2658271574788448768043625811014615890319638528000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_45 119622220865480194561963161495657715064383733760000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_46 5502622159812088949850305428800254892961651752960000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_47 258623241511168180642964355153611979969197632389120000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_48 12413915592536072670862289047373375038521486354677760000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_49 608281864034267560872252163321295376887552831379210240000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_50 30414093201713378043612608166064768844377641568960512000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_51 1551118753287382280224243016469303211063259720016986112000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_52 80658175170943878571660636856403766975289505440883277824000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_53 4274883284060025564298013753389399649690343788366813724672000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_54 230843697339241380472092742683027581083278564571807941132288000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_55 12696403353658275925965100847566516959580321051449436762275840000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_56 710998587804863451854045647463724949736497978881168458687447040000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_57 40526919504877216755680601905432322134980384796226602145184481280000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_58 2350561331282878571829474910515074683828862318181142924420699914240000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_59 138683118545689835737939019720389406345902876772687432540821294940160000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_60 8320987112741390144276341183223364380754172606361245952449277696409600000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_61 507580213877224798800856812176625227226004528988036003099405939480985600000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_62 31469973260387937525653122354950764088012280797258232192163168247821107200000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_63 1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_64 126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_65 8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_66 544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_67 36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_68 2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_69 171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_70 11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_71 850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_72 61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_73 4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_74 330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_75 24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_76 1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_77 145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_78 11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_79 894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_80 71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_81 5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_82 475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_83 39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_84 3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_85 281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_86 24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_87 2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_88 185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_89 16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_90 1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_91 135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_92 12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_93 1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_94 108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_95 10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_96 991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_97 96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_98 9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_99 933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_100 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 192.168.1.4 50044 18.234.186.95 10625 SET :1:factorial_100 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 T OK +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.excessive-pipelining/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.excessive-pipelining/redis.log new file mode 100644 index 0000000000..43a39674b4 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.excessive-pipelining/redis.log @@ -0,0 +1,22 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 - - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 - - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 - - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 - - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 - - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 - - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 - - - T PONG +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.excessive-pipelining/weird.log b/testing/btest/Baseline/scripts.base.protocols.redis.excessive-pipelining/weird.log new file mode 100644 index 0000000000..df8197b56b --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.excessive-pipelining/weird.log @@ -0,0 +1,11 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path weird +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p name addl notice peer source +#types time string addr port addr port string string bool string string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 57156 ::1 6379 Redis_excessive_pipelining - F zeek - +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pipeline-with-quotes/output b/testing/btest/Baseline/scripts.base.protocols.redis.pipeline-with-quotes/output new file mode 100644 index 0000000000..49d861c74c --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pipeline-with-quotes/output @@ -0,0 +1 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pipeline-with-quotes/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.pipeline-with-quotes/redis.log new file mode 100644 index 0000000000..6158adcb86 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pipeline-with-quotes/redis.log @@ -0,0 +1,18 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET key "my value with spaces" T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET key2 'my value with single quotes' T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET key3 'my value with "double" inners' T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET key4 "my value with 'single' inners" T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET key5 "my value with \\"escaped\\" quotes" T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET key6 'my value with \\'escaped\\' quotes' T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET bad1 "unclosed double quotes F ERR Protocol error: unbalanced quotes in request +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 63754 ::1 6379 SET bad2 'unclosed single quotes - - +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pipelined-with-commands/output b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined-with-commands/output new file mode 100644 index 0000000000..8ea815acab --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined-with-commands/output @@ -0,0 +1,3 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +SET: HI 3 +GET: HI diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pipelined-with-commands/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined-with-commands/redis.log new file mode 100644 index 0000000000..3b14b0f663 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined-with-commands/redis.log @@ -0,0 +1,14 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56731 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56731 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56731 ::1 6379 SET HI 3 T OK +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 56731 ::1 6379 GET HI - T 3 +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pipelined/output b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined/output new file mode 100644 index 0000000000..49d861c74c --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined/output @@ -0,0 +1 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pipelined/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined/redis.log new file mode 100644 index 0000000000..f106cf8e2d --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pipelined/redis.log @@ -0,0 +1,13 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 51122 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 51122 ::1 6379 PING - - T PONG +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 ::1 51122 ::1 6379 PING - - T PONG +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pubsub/output b/testing/btest/Baseline/scripts.base.protocols.redis.pubsub/output new file mode 100644 index 0000000000..49d861c74c --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pubsub/output @@ -0,0 +1 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.pubsub/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.pubsub/redis.log new file mode 100644 index 0000000000..2f23f980ef --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.pubsub/redis.log @@ -0,0 +1,13 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 56162 127.0.0.1 6379 SUBSCRIBE - - T - +XXXXXXXXXX.XXXXXX ClEkJM2Vm5giqnMf4h 127.0.0.1 56163 127.0.0.1 6379 PUBLISH - - T - +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 56162 127.0.0.1 6379 - - - T - +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.set/output b/testing/btest/Baseline/scripts.base.protocols.redis.set/output new file mode 100644 index 0000000000..8473b404b8 --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.set/output @@ -0,0 +1,4 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +Key: test Value: hi +Key: one:1 Value: 2 +Key: two:2 Value: three diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.start-with-server/output b/testing/btest/Baseline/scripts.base.protocols.redis.start-with-server/output new file mode 100644 index 0000000000..49d861c74c --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.start-with-server/output @@ -0,0 +1 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. diff --git a/testing/btest/Baseline/scripts.base.protocols.redis.stream/redis.log b/testing/btest/Baseline/scripts.base.protocols.redis.stream/redis.log new file mode 100644 index 0000000000..d7ae07655a --- /dev/null +++ b/testing/btest/Baseline/scripts.base.protocols.redis.stream/redis.log @@ -0,0 +1,14 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +#separator \x09 +#set_separator , +#empty_field (empty) +#unset_field - +#path redis +#open XXXX-XX-XX-XX-XX-XX +#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p cmd.name cmd.key cmd.value success reply.value +#types time string addr port addr port string string string bool string +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 49992 127.0.0.1 6379 XADD - - T 1729622832637-0 +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 49992 127.0.0.1 6379 XADD - - T 1729622836953-0 +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 49992 127.0.0.1 6379 XADD - - T 1729622840530-0 +XXXXXXXXXX.XXXXXX CHhAvVGS1DHFjwGM9 127.0.0.1 49992 127.0.0.1 6379 XRANGE - - T - +#close XXXX-XX-XX-XX-XX-XX diff --git a/testing/btest/Traces/redis/almost-resp.pcap b/testing/btest/Traces/redis/almost-resp.pcap new file mode 100644 index 0000000000..c89951a6d0 Binary files /dev/null and b/testing/btest/Traces/redis/almost-resp.pcap differ diff --git a/testing/btest/Traces/redis/auth.pcap b/testing/btest/Traces/redis/auth.pcap new file mode 100644 index 0000000000..e564ab3a4e Binary files /dev/null and b/testing/btest/Traces/redis/auth.pcap differ diff --git a/testing/btest/Traces/redis/bulk-loading.pcap b/testing/btest/Traces/redis/bulk-loading.pcap new file mode 100644 index 0000000000..0a5b552439 Binary files /dev/null and b/testing/btest/Traces/redis/bulk-loading.pcap differ diff --git a/testing/btest/Traces/redis/client-skip-while-off.pcap b/testing/btest/Traces/redis/client-skip-while-off.pcap new file mode 100644 index 0000000000..454e821f9c Binary files /dev/null and b/testing/btest/Traces/redis/client-skip-while-off.pcap differ diff --git a/testing/btest/Traces/redis/django-cloud.pcap b/testing/btest/Traces/redis/django-cloud.pcap new file mode 100644 index 0000000000..dba025f494 Binary files /dev/null and b/testing/btest/Traces/redis/django-cloud.pcap differ diff --git a/testing/btest/Traces/redis/excessive-pipelining.pcap b/testing/btest/Traces/redis/excessive-pipelining.pcap new file mode 100644 index 0000000000..23a275c86d Binary files /dev/null and b/testing/btest/Traces/redis/excessive-pipelining.pcap differ diff --git a/testing/btest/Traces/redis/pipeline-quotes.pcap b/testing/btest/Traces/redis/pipeline-quotes.pcap new file mode 100644 index 0000000000..8a63d925e5 Binary files /dev/null and b/testing/btest/Traces/redis/pipeline-quotes.pcap differ diff --git a/testing/btest/Traces/redis/pipeline-with-commands.pcap b/testing/btest/Traces/redis/pipeline-with-commands.pcap new file mode 100644 index 0000000000..25a216bd01 Binary files /dev/null and b/testing/btest/Traces/redis/pipeline-with-commands.pcap differ diff --git a/testing/btest/Traces/redis/pipelining-example.pcap b/testing/btest/Traces/redis/pipelining-example.pcap new file mode 100644 index 0000000000..cff8185914 Binary files /dev/null and b/testing/btest/Traces/redis/pipelining-example.pcap differ diff --git a/testing/btest/Traces/redis/pubsub.pcap b/testing/btest/Traces/redis/pubsub.pcap new file mode 100644 index 0000000000..458070f948 Binary files /dev/null and b/testing/btest/Traces/redis/pubsub.pcap differ diff --git a/testing/btest/Traces/redis/reply-off-on-2conn.pcap b/testing/btest/Traces/redis/reply-off-on-2conn.pcap new file mode 100644 index 0000000000..bfa921ced5 Binary files /dev/null and b/testing/btest/Traces/redis/reply-off-on-2conn.pcap differ diff --git a/testing/btest/Traces/redis/reply-off-on.pcap b/testing/btest/Traces/redis/reply-off-on.pcap new file mode 100644 index 0000000000..cfe7540956 Binary files /dev/null and b/testing/btest/Traces/redis/reply-off-on.pcap differ diff --git a/testing/btest/Traces/redis/set.pcap b/testing/btest/Traces/redis/set.pcap new file mode 100644 index 0000000000..c8a2017341 Binary files /dev/null and b/testing/btest/Traces/redis/set.pcap differ diff --git a/testing/btest/Traces/redis/start-with-server.pcap b/testing/btest/Traces/redis/start-with-server.pcap new file mode 100644 index 0000000000..6b53af2132 Binary files /dev/null and b/testing/btest/Traces/redis/start-with-server.pcap differ diff --git a/testing/btest/Traces/redis/stream.pcap b/testing/btest/Traces/redis/stream.pcap new file mode 100644 index 0000000000..75371752a5 Binary files /dev/null and b/testing/btest/Traces/redis/stream.pcap differ diff --git a/testing/btest/scripts/base/protocols/redis/almost-redis.zeek b/testing/btest/scripts/base/protocols/redis/almost-redis.zeek new file mode 100644 index 0000000000..1bdfe95bde --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/almost-redis.zeek @@ -0,0 +1,11 @@ +# @TEST-DOC: Test 2 commands that look like RESP, then server responses don't +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/almost-resp.pcap %INPUT >output +# @TEST-EXEC: btest-diff redis.log +# +# Really, the first 2 ARE Redis. The later ones should not be logged because we +# realized it's not Redis. The output from the server is: +# +OK\r\n+OK\r\nnot RESP\r\nStill not RESP\r\nNope\r\n + +@load base/protocols/redis diff --git a/testing/btest/scripts/base/protocols/redis/auth.zeek b/testing/btest/scripts/base/protocols/redis/auth.zeek new file mode 100644 index 0000000000..d7bfb249a1 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/auth.zeek @@ -0,0 +1,28 @@ +# @TEST-DOC: Test Zeek with AUTH commands +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/auth.pcap %INPUT >output +# @TEST-EXEC: btest-diff output + +@load base/protocols/redis + +event Redis::auth_command(c: connection, command: Redis::AuthCommand) + { + print "AUTH"; + if ( command?$username ) + print fmt("username: %s", command$username); + else + print "username: default"; + + print fmt("password: %s", command$password); + } + +event Redis::reply(c: connection, data: Redis::ReplyData) + { + print "Auth succeeded:", data$value; + } + +event Redis::error(c: connection, data: Redis::ReplyData) + { + print "Auth failed:", data$value; + } diff --git a/testing/btest/scripts/base/protocols/redis/bulk.zeek b/testing/btest/scripts/base/protocols/redis/bulk.zeek new file mode 100644 index 0000000000..bcbde40052 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/bulk.zeek @@ -0,0 +1,17 @@ +# @TEST-DOC: Test Zeek parsing a trace file made with bulk-created SET commands +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/bulk-loading.pcap %INPUT >output +# @TEST-EXEC: btest-diff output + +# The bulk-loading functionality just sends the serialized form from some ruby +# code directly to the server, but it's useful to see if that trace might come +# up with something different. See: +# https://redis.io/docs/latest/develop/use/patterns/bulk-loading/ + +@load base/protocols/redis + +event Redis::set_command(c: connection, command: Redis::SetCommand) + { + print fmt("SET: %s %s", command$key, command$value); + } diff --git a/testing/btest/scripts/base/protocols/redis/client-reply-off-2conn.zeek b/testing/btest/scripts/base/protocols/redis/client-reply-off-2conn.zeek new file mode 100644 index 0000000000..8d127b35d0 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/client-reply-off-2conn.zeek @@ -0,0 +1,7 @@ +# @TEST-DOC: Test CLIENT REPLY OFF, but turns on with new connection +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/reply-off-on-2conn.pcap %INPUT >output +# @TEST-EXEC: btest-diff redis.log + +@load base/protocols/redis diff --git a/testing/btest/scripts/base/protocols/redis/client-reply-off.zeek b/testing/btest/scripts/base/protocols/redis/client-reply-off.zeek new file mode 100644 index 0000000000..389d897b72 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/client-reply-off.zeek @@ -0,0 +1,7 @@ +# @TEST-DOC: Test CLIENT REPLY OFF then ON again and a SKIP +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/reply-off-on.pcap %INPUT >output +# @TEST-EXEC: btest-diff redis.log + +@load base/protocols/redis diff --git a/testing/btest/scripts/base/protocols/redis/client-skip-while-off.zeek b/testing/btest/scripts/base/protocols/redis/client-skip-while-off.zeek new file mode 100644 index 0000000000..ac596fc750 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/client-skip-while-off.zeek @@ -0,0 +1,7 @@ +# @TEST-DOC: Test CLIENT REPLY OFF then ON again and a SKIP +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/client-skip-while-off.pcap %INPUT >output +# @TEST-EXEC: btest-diff redis.log + +@load base/protocols/redis diff --git a/testing/btest/scripts/base/protocols/redis/django-cloud.zeek b/testing/btest/scripts/base/protocols/redis/django-cloud.zeek new file mode 100644 index 0000000000..0823a837fc --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/django-cloud.zeek @@ -0,0 +1,39 @@ +# @TEST-DOC: Test Redis traffic from a django app using Redis (in the cloud) as a cache +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/django-cloud.pcap %INPUT >output +# @TEST-EXEC: btest-diff output +# @TEST-EXEC: btest-diff redis.log +# @TEST-EXEC: btest-diff conn.log + +# This test has a bunch of factorial commands, try to test for the correct +# factorial without exploding the baseline + +@load base/protocols/conn +@load base/protocols/redis + +redef Redis::ports += { + 10625/tcp, +}; + +global largest_num: count = 0; +global largest_result: string = ""; +global num_sets: count = 0; + +event Redis::set_command(c: connection, command: Redis::SetCommand) + { + local factorial_of = to_count(command$key[13:]); + if ( factorial_of > largest_num ) + { + largest_num = factorial_of; + largest_result = command$value[:]; + } + + num_sets += 1; + } + +event zeek_done() + { + print fmt("Factorial of %d is %s", largest_num, largest_result); + print fmt("Found %d SET commands", num_sets); + } diff --git a/testing/btest/scripts/base/protocols/redis/excessive-pipelining.zeek b/testing/btest/scripts/base/protocols/redis/excessive-pipelining.zeek new file mode 100644 index 0000000000..1a4f8f15bb --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/excessive-pipelining.zeek @@ -0,0 +1,11 @@ +# @TEST-DOC: Test Zeek parsing "pipelined" data responses +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/excessive-pipelining.pcap %INPUT >output +# @TEST-EXEC: btest-diff redis.log +# @TEST-EXEC: btest-diff weird.log + +@load base/protocols/redis + +# Make sure we get a weird if we go over the pipelining threshold (intentionally limited) +redef Redis::max_pending_commands = 5; diff --git a/testing/btest/scripts/base/protocols/redis/pipeline-with-quotes.zeek b/testing/btest/scripts/base/protocols/redis/pipeline-with-quotes.zeek new file mode 100644 index 0000000000..bf159acfe5 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/pipeline-with-quotes.zeek @@ -0,0 +1,12 @@ +# @TEST-DOC: Test Zeek parsing "pipelined" data responses +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/pipeline-quotes.pcap %INPUT >output +# @TEST-EXEC: btest-diff output +# @TEST-EXEC: btest-diff redis.log +# TODO: Make it so weird.log exists again with `zeek::weird` for inline commands +# btest-diff weird.log + +# Tests unserialized data where quotes should make one token + +@load base/protocols/redis diff --git a/testing/btest/scripts/base/protocols/redis/pipelined-with-commands.zeek b/testing/btest/scripts/base/protocols/redis/pipelined-with-commands.zeek new file mode 100644 index 0000000000..c733bae9f5 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/pipelined-with-commands.zeek @@ -0,0 +1,22 @@ +# @TEST-DOC: Test Zeek parsing "pipelined" data responses +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/pipeline-with-commands.pcap %INPUT >output +# @TEST-EXEC: btest-diff output +# @TEST-EXEC: btest-diff redis.log + +# Sometimes commands aren't serialized, like when pipelining. This still works! So we +# should handle this. This particular example has a few commands, amongst them a SET and +# a GET. + +@load base/protocols/redis + +event Redis::set_command(c: connection, command: Redis::SetCommand) + { + print fmt("SET: %s %s", command$key, command$value); + } + +event Redis::get_command(c: connection, key: string) + { + print fmt("GET: %s", key); + } diff --git a/testing/btest/scripts/base/protocols/redis/pipelined.zeek b/testing/btest/scripts/base/protocols/redis/pipelined.zeek new file mode 100644 index 0000000000..689cf60418 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/pipelined.zeek @@ -0,0 +1,15 @@ +# @TEST-DOC: Test Zeek parsing "pipelined" data responses +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/pipelining-example.pcap %INPUT >output +# @TEST-EXEC: btest-diff output +# @TEST-EXEC: btest-diff redis.log + +# Testing the example of "pipelining" in REDIS docs: +# https://redis.io/docs/latest/develop/use/pipelining/ +# Namely sending three PINGs. This does not get sent as RESP data, but we should +# be able to skip it and get the responses, which are properly encoded. +# +# Also, you can send serialized data this way - that's kinda what the bulk test does. + +@load base/protocols/redis diff --git a/testing/btest/scripts/base/protocols/redis/pubsub.zeek b/testing/btest/scripts/base/protocols/redis/pubsub.zeek new file mode 100644 index 0000000000..15f6d9bb59 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/pubsub.zeek @@ -0,0 +1,12 @@ +# @TEST-DOC: Test Zeek parsing pubsub commands +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/pubsub.pcap %INPUT >output +# @TEST-EXEC: btest-diff output +# @TEST-EXEC: btest-diff redis.log + +# Testing the example of pub sub in REDIS docs: +# https://redis.io/docs/latest/develop/interact/pubsub/ +# These are just commands between two different clients, one PUBLISH and one SUBSCRIBE + +@load base/protocols/redis diff --git a/testing/btest/scripts/base/protocols/redis/set.zeek b/testing/btest/scripts/base/protocols/redis/set.zeek new file mode 100644 index 0000000000..c84573a575 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/set.zeek @@ -0,0 +1,12 @@ +# @TEST-DOC: Test Zeek parsing SET commands +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/set.pcap %INPUT >output +# @TEST-EXEC: btest-diff output + +@load base/protocols/redis + +event Redis::set_command(c: connection, command: Redis::SetCommand) + { + print fmt("Key: %s Value: %s", command$key, command$value); + } diff --git a/testing/btest/scripts/base/protocols/redis/start-with-server.zeek b/testing/btest/scripts/base/protocols/redis/start-with-server.zeek new file mode 100644 index 0000000000..ef42be3152 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/start-with-server.zeek @@ -0,0 +1,22 @@ +# @TEST-DOC: Test that Redis does not parse if it starts with the server data +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/start-with-server.pcap %INPUT >output +# @TEST-EXEC: btest-diff output + +@load base/protocols/redis + +event Redis::command(c: connection, command: Redis::Command) + { + print "BAD", command; + } + +event Redis::reply(c: connection, dat: Redis::ReplyData) + { + print "BAD", dat; + } + +event Redis::error(c: connection, dat: Redis::ReplyData) + { + print "BAD", dat; + } diff --git a/testing/btest/scripts/base/protocols/redis/stream.zeek b/testing/btest/scripts/base/protocols/redis/stream.zeek new file mode 100644 index 0000000000..1872807092 --- /dev/null +++ b/testing/btest/scripts/base/protocols/redis/stream.zeek @@ -0,0 +1,10 @@ +# @TEST-DOC: Test Zeek parsing pubsub commands +# @TEST-REQUIRES: have-spicy +# +# @TEST-EXEC: zeek -b -r $TRACES/redis/stream.pcap %INPUT >output +# @TEST-EXEC: btest-diff redis.log + +# Streams like with XRANGE return arrays of bulk strings. We shouldn't count the +# response as commands. + +@load base/protocols/redis diff --git a/testing/external/commit-hash.zeek-testing-private b/testing/external/commit-hash.zeek-testing-private index e7dc949572..8f43b1f231 100644 --- a/testing/external/commit-hash.zeek-testing-private +++ b/testing/external/commit-hash.zeek-testing-private @@ -1 +1 @@ -d20f3027e30434d340f1d3b45b5f86c84e5c74e0 +f7c740ab3c2781252ab7d0620715091f6b61ae5d