zeek/testing/btest/spicy/replaces-conflicts.evt
Robin Sommer 4318d5ab9e
Spicy: Disallow repeating replacements of the same analyzer.
We now reject EVT files that attempt to replace the same built-in
analyzer multiple times as doing so would be ill-defined and not very
intuitive in what exactly it means.

Closes #3783.
2024-06-14 13:10:47 +02:00

42 lines
797 B
Text

# @TEST-REQUIRES: have-spicy
#
# @TEST-EXEC: spicyz -d -o ssh.hlto ssh.spicy %INPUT
# @TEST-EXEC-FAIL: zeek ssh.hlto >output 2>&1
# @TEST-EXEC: btest-diff output
# @TEST-START-FILE ssh.spicy
module SSH;
import zeek;
public type Banner = unit {};
# @TEST-END-FILE
protocol analyzer spicy::SSH_1 over TCP:
parse with SSH::Banner,
replaces SSH;
protocol analyzer spicy::SSH_1 over UDP:
parse with SSH::Banner,
replaces SSH;
# @TEST-START-NEXT
file analyzer spicy::SSH_1:
parse with SSH::Banner,
replaces MD5;
file analyzer spicy::SSH_2:
parse with SSH::Banner,
replaces MD5;
# @TEST-START-NEXT
packet analyzer spicy::SSH_1:
parse with SSH::Banner,
replaces Ethernet;
packet analyzer spicy::SSH_2:
parse with SSH::Banner,
replaces Ethernet;