英語修正 (#236)
* 英語修正 * cargo fmt * fixed test assertion string data Co-authored-by: DustInDark <nextsasasa@gmail.com>
This commit is contained in:
@@ -73,7 +73,7 @@ impl Detection {
|
||||
// ruleファイルのパースに失敗した場合はエラー出力
|
||||
err_msgs_result.err().iter().for_each(|err_msgs| {
|
||||
let errmsg_body =
|
||||
format!("Failed to parse Rule file. (FilePath : {})", rule.rulepath);
|
||||
format!("Failed to parse rule file. (FilePath : {})", rule.rulepath);
|
||||
AlertMessage::warn(&mut std::io::stdout().lock(), errmsg_body).ok();
|
||||
|
||||
err_msgs.iter().for_each(|err_msg| {
|
||||
@@ -145,8 +145,8 @@ impl Detection {
|
||||
|
||||
pub fn print_unique_results(&self) {
|
||||
let rules = &self.rules;
|
||||
let levellabel = Vec::from(["Critical", "High", "Medium", "Low", "Info", "Undeifned"]);
|
||||
// levclcounts is [(Undeifned), (Info), (Low),(Medium),(High),(Critical)]
|
||||
let levellabel = Vec::from(["Critical", "High", "Medium", "Low", "Info", "Undefined"]);
|
||||
// levels are [(Undeifned), (Info), (Low),(Medium),(High),(Critical)]
|
||||
let mut levelcounts = Vec::from([0, 0, 0, 0, 0, 0]);
|
||||
for rule in rules.into_iter() {
|
||||
if rule.check_exist_countdata() {
|
||||
@@ -165,10 +165,10 @@ impl Detection {
|
||||
let mut total_unique = 0;
|
||||
levelcounts.reverse();
|
||||
for (i, value) in levelcounts.iter().enumerate() {
|
||||
println!("{} alerts {}", levellabel[i], value);
|
||||
println!("{} alerts: {}", levellabel[i], value);
|
||||
total_unique += value;
|
||||
}
|
||||
println!("Unique Events Detected: {}", total_unique);
|
||||
println!("Unique events detected: {}", total_unique);
|
||||
}
|
||||
|
||||
// 複数のイベントレコードに対して、ルールを1個実行します。
|
||||
@@ -246,12 +246,12 @@ impl Detection {
|
||||
) {
|
||||
let mut total = parseerror_count + ignore_count;
|
||||
rc.into_iter().for_each(|(key, value)| {
|
||||
println!("{} Rules: {}", key, value);
|
||||
println!("{} rules: {}", key, value);
|
||||
total += value;
|
||||
});
|
||||
println!("Ignored Rule Count: {}", ignore_count);
|
||||
println!("Rule Parse Errors Count: {}", parseerror_count);
|
||||
println!("Total Detection Rules: {}", total);
|
||||
println!("Ignored rules: {}", ignore_count);
|
||||
println!("Rule parsing errors: {}", parseerror_count);
|
||||
println!("Total detection rules: {}", total);
|
||||
println!("");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user