mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00

This is based on commit 2731def9159247e6da8a3191783c89683363689c from the zeek-docs repo.
12 lines
327 B
Text
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;
|
|
}
|