mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

For backward compatibility when reading values, we first check the ZEEK-prefixed value, and if not set, then check the corresponding BRO-prefixed value.
18 lines
598 B
Text
18 lines
598 B
Text
# @TEST-EXEC: ${DIST}/aux/zeek-aux/plugin-support/init-plugin -u . Demo Foo
|
|
# @TEST-EXEC: cp -r %DIR/file-plugin/* .
|
|
# @TEST-EXEC: ./configure --bro-dist=${DIST} && make
|
|
# @TEST-EXEC: ZEEK_PLUGIN_PATH=`pwd` zeek -NN Demo::Foo >>output
|
|
# @TEST-EXEC: echo === >>output
|
|
# @TEST-EXEC: ZEEK_PLUGIN_PATH=`pwd` zeek -r $TRACES/ftp/retr.trace %INPUT >>output
|
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff output
|
|
|
|
event file_new(f: fa_file)
|
|
{
|
|
Files::add_analyzer(f, Files::ANALYZER_FOO);
|
|
}
|
|
|
|
event foo_piece(f: fa_file, data: string)
|
|
{
|
|
print "foo_piece", f$id, sub_bytes(data, 0, 20);
|
|
}
|
|
|