Add: default output when no details are defined #606
This commit is contained in:
@@ -243,10 +243,11 @@ impl Detection {
|
|||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let eid = get_serde_number_to_string(&record_info.record["Event"]["System"]["EventID"])
|
let eid = get_serde_number_to_string(&record_info.record["Event"]["System"]["EventID"])
|
||||||
.unwrap_or_else(|| "-".to_owned());
|
.unwrap_or_else(|| "-".to_owned());
|
||||||
let default_output = DEFAULT_DETAILS
|
let default_output = match DEFAULT_DETAILS
|
||||||
.get(&format!("{}_{}", provider, &eid))
|
.get(&format!("{}_{}", provider, &eid)) {
|
||||||
.unwrap_or(&"-".to_string())
|
Some(str) => str.to_owned(),
|
||||||
.to_string();
|
None => recinfo.as_ref().unwrap_or(&"-".to_string()).to_string(),
|
||||||
|
};
|
||||||
let detect_info = DetectInfo {
|
let detect_info = DetectInfo {
|
||||||
filepath: record_info.evtx_filepath.to_string(),
|
filepath: record_info.evtx_filepath.to_string(),
|
||||||
rulepath: rule.rulepath.to_string(),
|
rulepath: rule.rulepath.to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user