zeek/doc/frameworks/file_analysis_02.bro
Seth Hall ed375167c8 File API updates complete.
Addresses BIT-1368.
2015-04-20 10:46:48 -04:00

12 lines
327 B
Text

event file_sniff(f: fa_file, meta: fa_metadata)
{
if ( ! meta?$mime_type ) return;
print "new file", f$id;
if ( meta$mime_type == "text/plain" )
Files::add_analyzer(f, Files::ANALYZER_MD5);
}
event file_hash(f: fa_file, kind: string, hash: string)
{
print "file_hash", f$id, kind, hash;
}