From 320bcde89e88d7cab0ee8769825e47cdcbe640e4 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Wed, 16 Sep 2015 11:24:15 -0300 Subject: [PATCH] Adds rule number to the debug logs and printing expaded variables --- src/rule.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rule.cc b/src/rule.cc index cdaa01f4..17e385f1 100644 --- a/src/rule.cc +++ b/src/rule.cc @@ -30,6 +30,7 @@ #include "actions/transformations/none.h" #include "variables/variations/exclusion.h" #include "src/utils.h" +#include "src/macro_expansion.h" using ModSecurity::Variables::Variations::Exclusion; @@ -195,8 +196,11 @@ bool Rule::evaluate(Assay *assay) { return evaluateActions(assay); } - assay->debug(4, "Executing operator \"" + this->op->op \ - + "\" with param \"" + this->op->param + "\" against " \ + assay->debug(4, "(Rule: " + std::to_string(rule_id) \ + + ") Executing operator \"" + this->op->op \ + + "\" with param: " \ + + MacroExpansion::expandKeepOriginal(this->op->param, assay) \ + + ", against " \ + Variable::to_s(variables) + "."); clock_t begin = clock();