zeek/testing/btest/core/analyzer-stream-event.zeek
Arne Welzel 51836d08ae protocol: Add StreamEvent analyzer
This analyzer can be used to transport raw stream data for a given
connection to the script layer. For example, adding this analyzer into
the HTTP::upgrade_analyzer or using it to configure a child WebSocket
analyzer allows to get access to the raw stream data in script land
when no more appropriate protocol analyzer is available.
2024-12-06 16:12:40 +01:00

12 lines
299 B
Text

# @TEST-EXEC: zeek -b -r $TRACES/http/get.trace %INPUT >out
# @TEST-EXEC: btest-diff out
event zeek_init()
{
Analyzer::register_for_port(Analyzer::ANALYZER_STREAM_EVENT, 80/tcp);
}
event stream_deliver(c: connection, is_orig: bool, data: string)
{
print c$uid, is_orig, |data|, data[:32];
}