From 377213c294f04f4bafbc3c4e10033475f50b0bf2 Mon Sep 17 00:00:00 2001 From: ichiichi11 Date: Mon, 22 Mar 2021 00:02:24 +0900 Subject: [PATCH] change comment --- src/detections/detection.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/detections/detection.rs b/src/detections/detection.rs index 021ac5d0..1dec8b51 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -30,21 +30,19 @@ impl Detection { return; } - // parse rule files let rules = self.parse_rule_files(); if rules.is_empty() { return; } - // transform from evtx files into json let records = self.evtx_to_jsons(evtx_files); - runtime::Runtime::new() .unwrap() .block_on(self.execute_rule(rules, records)); } + // ルールファイルをパースします。 fn parse_rule_files(&self) -> Vec { // load rule files let mut rulefile_loader = ParseYaml::new(); @@ -85,7 +83,7 @@ impl Detection { .collect(); } - // evtxファイルをjsonに変換する。 + // evtxファイルをjsonに変換します。 fn evtx_to_jsons(&mut self, evtx_files: Vec) -> Vec { // EvtxParserを生成する。 let evtx_parsers: Vec> = evtx_files @@ -157,6 +155,7 @@ impl Detection { .collect(); } + // xmlからjsonに変換します。 async fn xml_to_json(&mut self, xml_records: Vec>) -> Vec { // xmlからjsonに変換するJobを作成 let handles: Vec>> = xml_records @@ -194,6 +193,7 @@ impl Detection { .collect(); } + // 検知ロジックを実行します。 async fn execute_rule(&mut self, rules: Vec, records: Vec) { // 複数スレッドで所有権を共有するため、recordsをArcでwwap let mut records_arcs = vec![];