Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -73,7 +73,7 @@ fn detect_files(evtx_files: Vec<PathBuf>) {
|
||||
let evnt_records = evtx_to_jsons(&evtx_files);
|
||||
|
||||
let mut tl = Timeline::new();
|
||||
tl.start(&evnt_records);
|
||||
tl.start(&evtx_files, &evnt_records);
|
||||
|
||||
let mut detection = detection::Detection::new();
|
||||
&detection.start(evnt_records);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::detections::{configs, detection::EvtxRecordInfo};
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -18,7 +20,11 @@ impl EventStatistics {
|
||||
// recordからEventIDを取得するには、detection::utils::get_event_value()という関数があるので、それを使うと便利かもしれません。
|
||||
|
||||
// 現状では、この関数の戻り値として返すVec<String>を表示するコードは実装していません。
|
||||
pub fn start(&mut self, _records: &Vec<EvtxRecordInfo>) -> Vec<String> {
|
||||
pub fn start(
|
||||
&mut self,
|
||||
evtx_files: &Vec<PathBuf>,
|
||||
records: &Vec<EvtxRecordInfo>,
|
||||
) -> Vec<String> {
|
||||
// 引数でstatisticsオプションが指定されている時だけ、統計情報を出力する。
|
||||
if !configs::CONFIG
|
||||
.read()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::detections::detection::EvtxRecordInfo;
|
||||
|
||||
use super::statistics::EventStatistics;
|
||||
@@ -10,8 +12,8 @@ impl Timeline {
|
||||
return Timeline {};
|
||||
}
|
||||
|
||||
pub fn start(&mut self, records: &Vec<EvtxRecordInfo>) {
|
||||
pub fn start(&mut self, evtx_files: &Vec<PathBuf>, records: &Vec<EvtxRecordInfo>) {
|
||||
let mut statistic = EventStatistics::new();
|
||||
statistic.start(records);
|
||||
statistic.start(evtx_files, records);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user