fixed output format
This commit is contained in:
@@ -276,12 +276,12 @@ impl Detection {
|
|||||||
profile_converter.insert("%EventID%".to_string(), eid.to_owned());
|
profile_converter.insert("%EventID%".to_string(), eid.to_owned());
|
||||||
}
|
}
|
||||||
"%MitreAttack%" => {
|
"%MitreAttack%" => {
|
||||||
profile_converter.insert("%MitreAttack%".to_string(), tag_info.join(" | "));
|
profile_converter.insert("%MitreAttack%".to_string(), tag_info.join(" : "));
|
||||||
}
|
}
|
||||||
"%RecordID%" => {
|
"%RecordID%" => {
|
||||||
profile_converter.insert(
|
profile_converter.insert(
|
||||||
"%RecordID%".to_string(),
|
"%RecordID%".to_string(),
|
||||||
rec_id.as_ref().unwrap_or(&"-".to_string()).to_owned(),
|
rec_id.as_ref().unwrap_or(&"".to_string()).to_owned(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
"%RuleTitle%" => {
|
"%RuleTitle%" => {
|
||||||
@@ -387,10 +387,10 @@ impl Detection {
|
|||||||
profile_converter.insert("%EventID%".to_string(), "-".to_owned());
|
profile_converter.insert("%EventID%".to_string(), "-".to_owned());
|
||||||
}
|
}
|
||||||
"%MitreAttack%" => {
|
"%MitreAttack%" => {
|
||||||
profile_converter.insert("%MitreAttack%".to_owned(), tag_info.join(" | "));
|
profile_converter.insert("%MitreAttack%".to_owned(), tag_info.join(" : "));
|
||||||
}
|
}
|
||||||
"%RecordID%" => {
|
"%RecordID%" => {
|
||||||
profile_converter.insert("%RecordID%".to_string(), "-".to_owned());
|
profile_converter.insert("%RecordID%".to_string(), "".to_owned());
|
||||||
}
|
}
|
||||||
"%RuleTitle%" => {
|
"%RuleTitle%" => {
|
||||||
profile_converter.insert(
|
profile_converter.insert(
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ pub fn insert(
|
|||||||
let mut tmp_converted_info: LinkedHashMap<String, String> = LinkedHashMap::new();
|
let mut tmp_converted_info: LinkedHashMap<String, String> = LinkedHashMap::new();
|
||||||
for (k, v) in &detect_info.ext_field {
|
for (k, v) in &detect_info.ext_field {
|
||||||
let converted_reserve_info = convert_profile_reserved_info(v, profile_converter);
|
let converted_reserve_info = convert_profile_reserved_info(v, profile_converter);
|
||||||
if v == "%RecordInformation%" {
|
if v.contains("%RecordInformation%") || v.contains("%Details%") {
|
||||||
tmp_converted_info.insert(k.to_owned(), converted_reserve_info);
|
tmp_converted_info.insert(k.to_owned(), converted_reserve_info);
|
||||||
} else {
|
} else {
|
||||||
tmp_converted_info.insert(
|
tmp_converted_info.insert(
|
||||||
|
|||||||
Reference in New Issue
Block a user