mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00

The framework now cycles through callbacks based on a table indexed by analyzer tags, or the special case of service strings if a given analyzer is overloaded for multiple protocols (FTP/IRC data). This lets each protocol script bundle implement the callback locally and reduces the FAF's external dependencies.
21 lines
532 B
Text
21 lines
532 B
Text
@load ./main
|
|
@load ./utils
|
|
@load base/utils/conn-ids
|
|
@load base/frameworks/file-analysis/main
|
|
|
|
module HTTP;
|
|
|
|
function get_file_handle(c: connection, is_orig: bool): string
|
|
{
|
|
if ( ! c?$http ) return "";
|
|
|
|
if ( c$http$range_request )
|
|
return fmt("%s http(%s): %s: %s", c$start_time, is_orig,
|
|
c$id$orig_h, build_url(c$http));
|
|
return fmt("%s http(%s, %s): %s", c$start_time, is_orig,
|
|
c$http$trans_depth, id_string(c$id));
|
|
}
|
|
|
|
redef FileAnalysis::handle_callbacks += {
|
|
[ANALYZER_HTTP] = get_file_handle,
|
|
};
|