Fix a few things to provide an easy interface for script bindings

This commit is contained in:
Felipe Zimmerle
2015-12-22 11:50:18 -03:00
parent ac10d8863c
commit fb3696ac04
18 changed files with 49 additions and 19 deletions

View File

@@ -13,7 +13,7 @@
*
*/
#include "src/rule.h"
#include "modsecurity/rule.h"
#include <stdio.h>
@@ -135,6 +135,25 @@ Rule::Rule(Operator *_op,
}
std::vector<std::string> Rule::getActionNames() {
std::vector<std::string> a;
for (auto &z : this->actions_runtime_pos)
{
a.push_back(z->action);
}
for (auto &z : this->actions_runtime_pre)
{
a.push_back(z->action);
}
for (auto &z : this->actions_conf)
{
a.push_back(z->action);
}
return a;
}
bool Rule::evaluateActions(Assay *assay) {
int none = 0;
bool containsDisruptive = false;