Move logic to execute HookLoadFile for signatures into rule matcher code.

This (1) fixes an issue where signature files supplied on the command
line wouldn't pass through the hooks, and (2) prepares for allowing
hooks to supply the content of a signature file directly.
This commit is contained in:
Robin Sommer 2021-10-07 09:59:15 +02:00
parent f080a814c4
commit 1efaf8d7a4
9 changed files with 94 additions and 40 deletions

View file

@ -11,6 +11,7 @@
#include "zeek/CCL.h"
#include "zeek/RE.h"
#include "zeek/Rule.h"
#include "zeek/ScannedFile.h"
//#define MATCHER_PRINT_STATS
@ -259,7 +260,7 @@ public:
~RuleMatcher();
// Parse the given files and built up data structures.
bool ReadFiles(const std::vector<std::string>& files);
bool ReadFiles(const std::vector<SignatureFile>& files);
/**
* Inititialize a state object for matching file magic signatures.