refactoring
This commit is contained in:
@@ -6,7 +6,7 @@ use crate::detections::rule;
|
||||
use crate::detections::rule::RuleNode;
|
||||
use crate::yaml::ParseYaml;
|
||||
|
||||
use chrono::{DateTime, FixedOffset, ParseError, ParseResult, TimeZone, Utc};
|
||||
use chrono::{DateTime, FixedOffset, TimeZone, Utc};
|
||||
use evtx::EvtxParser;
|
||||
use serde_json::{Error, Value};
|
||||
|
||||
|
||||
@@ -268,16 +268,6 @@ impl LeafSelectionNode {
|
||||
fn get_matchers(&self) -> Vec<Box<dyn LeafMatcher>> {
|
||||
return vec![Box::new(RegexMatcher::new())];
|
||||
}
|
||||
|
||||
// LeafMatcherを取得する。
|
||||
fn get_matcher(&self) -> Option<Box<dyn LeafMatcher>> {
|
||||
let matchers = self.get_matchers();
|
||||
let mut match_key_list = self.key_list.clone();
|
||||
match_key_list.remove(0);
|
||||
return matchers
|
||||
.into_iter()
|
||||
.find(|matcher| matcher.is_target_key(&match_key_list));
|
||||
}
|
||||
}
|
||||
|
||||
impl SelectionNode for LeafSelectionNode {
|
||||
|
||||
Reference in New Issue
Block a user