Fixed output stop when control char exist in windows terminal (#485)

* added control character filter in details #382

* fixed document

- removed fixed windows teminal caution in readme
This commit is contained in:
DustInDark
2022-04-06 08:40:28 +09:00
committed by GitHub
parent c8efa95447
commit a5bf79cf83
3 changed files with 8 additions and 14 deletions
+8 -1
View File
@@ -199,7 +199,14 @@ fn emit_csv<W: std::io::Write>(
computer: &format!(" {} ", &detect_info.computername),
event_i_d: &format!(" {} ", &detect_info.eventid),
rule_title: &format!(" {} ", &detect_info.alert),
details: &format!(" {}", &detect_info.detail),
details: &format!(
" {}",
&detect_info
.detail
.chars()
.filter(|&c| !c.is_control())
.collect::<String>()
),
})?;
}
} else {