Add a file entropy test.

This commit is contained in:
Seth Hall 2016-04-13 00:44:02 -04:00
parent 2bde8ac052
commit adcc978f14
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1 @@
[entropy=4.950189, chi_square=63750.814665, mean=80.496493, monte_carlo_pi=4.0, serial_correlation=0.395907]

View file

@ -0,0 +1,13 @@
# @TEST-EXEC: bro -r $TRACES/http/get.trace %INPUT
# @TEST-EXEC: btest-diff .stdout
event file_new(f: fa_file)
{
Files::add_analyzer(f, Files::ANALYZER_ENTROPY);
}
event file_entropy(f: fa_file, ent: entropy_test_result)
{
print ent;
}