mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00

In certain deployment scenarios, all analyzers are disabled by default. However, conditionally/optionally loaded scripts may rely on analyzers functioning and declare a request for them. Add a global set set to the Analyzer module where external scripts can record their requirement/request for a certain analyzer. Analyzers found in this set are enabled at zeek_init() time.
16 lines
485 B
Text
16 lines
485 B
Text
# @TEST-DOC: Ensure only the HTTP analyzer is enabled (filter out some noise from the trace)
|
|
# @TEST-EXEC: zeek -b -f 'port 53 or port 80' -r ${TRACES}/wikipedia.trace %INPUT
|
|
# @TEST-EXEC: btest-diff conn.log
|
|
# @TEST-EXEC: btest-diff http.log
|
|
# @TEST-EXEC: test ! -f dns.log
|
|
|
|
@load base/protocols/conn
|
|
@load base/protocols/dns
|
|
@load base/protocols/http
|
|
|
|
# Turn all analyzers off.
|
|
redef Analyzer::disable_all = T;
|
|
|
|
redef Analyzer::requested_analyzers += {
|
|
Analyzer::ANALYZER_HTTP,
|
|
};
|