mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
FileAnalysis: change terminology s/action/analyzer
This commit is contained in:
parent
e81f2ae7b0
commit
b8c98b8bf7
30 changed files with 575 additions and 570 deletions
|
@ -1,7 +1,7 @@
|
|||
|
||||
global test_file_analysis_source: string = "" &redef;
|
||||
|
||||
global test_file_actions: set[FileAnalysis::ActionArgs];
|
||||
global test_file_analyzers: set[FileAnalysis::AnalyzerArgs];
|
||||
|
||||
global test_get_file_name: function(f: fa_file): string =
|
||||
function(f: fa_file): string { return ""; } &redef;
|
||||
|
@ -29,16 +29,16 @@ event file_new(f: fa_file)
|
|||
if ( test_file_analysis_source == "" ||
|
||||
f$source == test_file_analysis_source )
|
||||
{
|
||||
for ( act in test_file_actions )
|
||||
FileAnalysis::add_action(f, act);
|
||||
for ( tag in test_file_analyzers )
|
||||
FileAnalysis::add_analyzer(f, tag);
|
||||
|
||||
local filename: string = test_get_file_name(f);
|
||||
if ( filename != "" )
|
||||
FileAnalysis::add_action(f, [$act=FileAnalysis::ACTION_EXTRACT,
|
||||
$extract_filename=filename]);
|
||||
FileAnalysis::add_action(f, [$act=FileAnalysis::ACTION_DATA_EVENT,
|
||||
$chunk_event=file_chunk,
|
||||
$stream_event=file_stream]);
|
||||
FileAnalysis::add_analyzer(f, [$tag=FileAnalysis::ANALYZER_EXTRACT,
|
||||
$extract_filename=filename]);
|
||||
FileAnalysis::add_analyzer(f, [$tag=FileAnalysis::ANALYZER_DATA_EVENT,
|
||||
$chunk_event=file_chunk,
|
||||
$stream_event=file_stream]);
|
||||
}
|
||||
|
||||
if ( f?$bof_buffer )
|
||||
|
@ -96,7 +96,7 @@ event file_state_remove(f: fa_file)
|
|||
|
||||
event bro_init()
|
||||
{
|
||||
add test_file_actions[[$act=FileAnalysis::ACTION_MD5]];
|
||||
add test_file_actions[[$act=FileAnalysis::ACTION_SHA1]];
|
||||
add test_file_actions[[$act=FileAnalysis::ACTION_SHA256]];
|
||||
add test_file_analyzers[[$tag=FileAnalysis::ANALYZER_MD5]];
|
||||
add test_file_analyzers[[$tag=FileAnalysis::ANALYZER_SHA1]];
|
||||
add test_file_analyzers[[$tag=FileAnalysis::ANALYZER_SHA256]];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue