mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
27 lines
736 B
Text
27 lines
736 B
Text
# @TEST-REQUIRES: have-spicy
|
|
#
|
|
# @TEST-EXEC: spicyz -d -o test.hlto %INPUT test.evt
|
|
# @TEST-EXEC: zeek -b -r ${TRACES}/ssh/single-conn.trace Zeek::Spicy test.hlto test.zeek Spicy::enable_print=T >>output
|
|
# @TEST-EXEC: zeek -b -r ${TRACES}/ftp/ipv6.trace Zeek::Spicy test.hlto test.zeek Spicy::enable_print=T >>output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
module Test;
|
|
|
|
import zeek;
|
|
|
|
public type Foo = unit {
|
|
on %init { print zeek::conn_id(); }
|
|
x : /./;
|
|
};
|
|
|
|
# @TEST-START-FILE test.evt
|
|
protocol analyzer spicy::Test over TCP:
|
|
parse originator with Test::Foo;
|
|
# @TEST-END-FILE
|
|
|
|
# @TEST-START-FILE test.zeek
|
|
event zeek_init()
|
|
{
|
|
Analyzer::register_for_ports(Analyzer::ANALYZER_SPICY_TEST, set(21/tcp, 22/tcp));
|
|
}
|
|
# @TEST-END-FILE
|