mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Added protocol description functions that provide a super compressed log representation.
This commit is contained in:
parent
4dd4c5344e
commit
0bfdcc1fbc
13 changed files with 190 additions and 75 deletions
|
@ -1,23 +0,0 @@
|
|||
@load ./dcc-send
|
||||
@load base/utils/conn-ids
|
||||
@load base/frameworks/files
|
||||
|
||||
module IRC;
|
||||
|
||||
export {
|
||||
## Default file handle provider for IRC.
|
||||
global get_file_handle: function(c: connection, is_orig: bool): string;
|
||||
}
|
||||
|
||||
function get_file_handle(c: connection, is_orig: bool): string
|
||||
{
|
||||
if ( [c$id$resp_h, c$id$resp_p] !in dcc_expected_transfers )
|
||||
return "";
|
||||
|
||||
return cat(ANALYZER_IRC_DATA, c$start_time, c$id, is_orig);
|
||||
}
|
||||
|
||||
event bro_init() &priority=5
|
||||
{
|
||||
Files::register_protocol(ANALYZER_IRC_DATA, IRC::get_file_handle);
|
||||
}
|
|
@ -24,7 +24,8 @@ function get_file_handle(c: connection, is_orig: bool): string
|
|||
|
||||
event bro_init() &priority=5
|
||||
{
|
||||
Files::register_protocol(Analyzer::ANALYZER_IRC_DATA, IRC::get_file_handle);
|
||||
Files::register_protocol(Analyzer::ANALYZER_IRC_DATA,
|
||||
[$get_file_handle = IRC::get_file_handle]);
|
||||
}
|
||||
|
||||
event file_over_new_connection(f: fa_file, c: connection, is_orig: bool) &priority=5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue