diff --git a/config/default_profile.txt b/config/default_profile.txt new file mode 100644 index 00000000..3345562f --- /dev/null +++ b/config/default_profile.txt @@ -0,0 +1,14 @@ +--- +Timestamp: '%Timestamp%' +Computer: '%Computer%' +Channel: '%Channel%' +Level: '%Level%' +EventID: '%EventID%' +MitreAttack: '%MitreAttack%' +RecordID: '%RecordID%' +RuleTitle: '%RuleTitle%' +Details: '%Details%' +RecordInformation: '%RecordInformation%' +RuleFile: '%RuleFile%' +EvtxFile: '%EvtxFile%' +Tags: '%MitreAttack%' diff --git a/src/options/profile.rs b/src/options/profile.rs index 1e65933a..21d83603 100644 --- a/src/options/profile.rs +++ b/src/options/profile.rs @@ -136,7 +136,12 @@ pub fn set_default_profile(default_profile_path: &str, profile_path: &str) -> Re // デフォルトプロファイルを設定する処理 if let Some(profile_name) = &configs::CONFIG.read().unwrap().args.set_default_profile { - if let Ok(mut buf_wtr) = OpenOptions::new().write(true).truncate(true).open(default_profile_path).map(BufWriter::new) { + if let Ok(mut buf_wtr) = OpenOptions::new() + .write(true) + .truncate(true) + .open(default_profile_path) + .map(BufWriter::new) + { let prof_all_data = &profile_data[0]; let overwrite_default_data = &prof_all_data[profile_name.as_str()]; if !overwrite_default_data.is_null() { @@ -152,7 +157,7 @@ pub fn set_default_profile(default_profile_path: &str, profile_path: &str) -> Re _ => { buf_wtr.flush().ok(); Ok(()) - }, + } }, Err(e) => Err(format!( "Failed set profile to default profile file({}). {}",