changed no outpu rule parse result with -s option #343

This commit is contained in:
DustInDark
2021-12-23 15:45:11 +09:00
parent acaae4b328
commit 716e0a182a
2 changed files with 6 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ use crate::detections::print::AlertMessage;
use crate::detections::print::ERROR_LOG_STACK;
use crate::detections::print::MESSAGES;
use crate::detections::print::QUIET_ERRORS_FLAG;
use crate::detections::print::STATISTICS_FLAG;
use crate::detections::rule;
use crate::detections::rule::AggResult;
use crate::detections::rule::RuleNode;
@@ -273,6 +274,9 @@ impl Detection {
parseerror_count: &u128,
ignore_count: &u128,
) {
if *STATISTICS_FLAG {
return;
}
let mut total = parseerror_count + ignore_count;
rc.into_iter().for_each(|(key, value)| {
println!("{} rules: {}", key, value);