mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
First commit of file entropy analyzer.
- Code comments need cleaned up still.
This commit is contained in:
parent
2f0671aeeb
commit
b7877792c9
7 changed files with 221 additions and 0 deletions
29
src/file_analysis/analyzer/entropy/Plugin.cc
Normal file
29
src/file_analysis/analyzer/entropy/Plugin.cc
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include "plugin/Plugin.h"
|
||||
#include "file_analysis/Component.h"
|
||||
|
||||
#include "Entropy.h"
|
||||
|
||||
namespace plugin { namespace Bro_FileEntropy {
|
||||
|
||||
class Plugin : public plugin::Plugin {
|
||||
protected:
|
||||
void InitPreScript()
|
||||
{
|
||||
SetName("Bro::FileEntropy");
|
||||
SetVersion(-1);
|
||||
SetAPIVersion(BRO_PLUGIN_API_VERSION);
|
||||
SetDynamicPlugin(false);
|
||||
|
||||
SetDescription("Entropy test file content");
|
||||
|
||||
AddComponent(new ::file_analysis::Component("ENTROPY",
|
||||
::file_analysis::Entropy::Instantiate));
|
||||
|
||||
extern std::list<std::pair<const char*, int> > __bif_events_init();
|
||||
AddBifInitFunction(&__bif_events_init);
|
||||
}
|
||||
};
|
||||
|
||||
Plugin __plugin;
|
||||
|
||||
} }
|
Loading…
Add table
Add a link
Reference in a new issue