mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
FileAnalysis: separating IRC/FTP data analyzers.
It simplifies the file handle string callbacks.
This commit is contained in:
parent
59ed5c75f1
commit
661677d452
37 changed files with 156 additions and 95 deletions
|
@ -104,7 +104,7 @@ event irc_dcc_message(c: connection, is_orig: bool,
|
|||
c$irc$dcc_file_name = argument;
|
||||
c$irc$dcc_file_size = size;
|
||||
local p = count_to_port(dest_port, tcp);
|
||||
expect_connection(to_addr("0.0.0.0"), address, p, ANALYZER_FILE, 5 min);
|
||||
expect_connection(to_addr("0.0.0.0"), address, p, ANALYZER_IRC_DATA, 5 min);
|
||||
dcc_expected_transfers[address, p] = c$irc;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
@load base/utils/conn-ids
|
||||
@load base/frameworks/file-analysis/main
|
||||
|
||||
redef FileAnalysis::service_handle_callbacks += {
|
||||
["irc-dcc-data"] = function(c: connection, is_orig: bool): string
|
||||
redef FileAnalysis::handle_callbacks += {
|
||||
[ANALYZER_IRC_DATA] = function(c: connection, is_orig: bool): string
|
||||
{
|
||||
if ( is_orig ) return "";
|
||||
return fmt("%s irc-dcc-data: %s", c$start_time, id_string(c$id));
|
||||
return fmt("%s %s %s", ANALYZER_IRC_DATA, c$start_time,
|
||||
id_string(c$id));
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue