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

* origin/fastpath: Fix a few incorrect type tags in Bro broker source code Update docs and tests of the fmt() function Revert "Fix RFB analyzer to build on FreeBSD" Fix RFB analyzer to build on FreeBSD
20 lines
385 B
Text
20 lines
385 B
Text
|
|
module Files;
|
|
|
|
export {
|
|
redef record Files::Info += {
|
|
## The information density of the contents of the file,
|
|
## expressed as a number of bits per character.
|
|
entropy: double &log &optional;
|
|
};
|
|
}
|
|
|
|
event file_new(f: fa_file)
|
|
{
|
|
Files::add_analyzer(f, Files::ANALYZER_ENTROPY);
|
|
}
|
|
|
|
event file_entropy(f: fa_file, ent: entropy_test_result)
|
|
{
|
|
f$info$entropy = ent$entropy;
|
|
}
|