diff --git a/CHANGELOG-Japanese.md b/CHANGELOG-Japanese.md index 69bdd96b9..84782284f 100644 --- a/CHANGELOG-Japanese.md +++ b/CHANGELOG-Japanese.md @@ -1,5 +1,11 @@ # 変更点 +## x.x.x [xxxx/xx/xx] + +**バグ修正:** + +- `csv-timeline`と`json-timeline`コマンドで、結果をターミナルに出力すると、プログレスバーの後にいくつかの結果が表示されていた。 (#1459) (@fukusuket) + ## 2.18.0 [2024/10/23] - SecTor Release **新機能:** diff --git a/CHANGELOG.md b/CHANGELOG.md index 7868ed896..ddefe0be1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changes +## x.x.x [xxxx/xx/xx] + +**Bug Fixes:** + +- Some results would be displayed after the progress bar when outputting results to the terminal with `csv-timeline` and `json-timeline`. (#1459) (@fukusuket) + ## 2.18.0 [2024/10/23] - SecTor Release **New Features:** diff --git a/src/afterfact.rs b/src/afterfact.rs index 92aede2dc..df09faa01 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -482,7 +482,9 @@ fn emit_csv_inner( if !afterfact_writer.display_flag { afterfact_writer.csv_writer.flush()?; } - + if json_output_flag && stored_static.output_path.is_none() { + println!() + } Ok(()) } diff --git a/src/main.rs b/src/main.rs index 3b4e73d75..d695c9ff5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1607,9 +1607,6 @@ impl App { pb.inc(1); } } - pb.finish_with_message( - "Scanning finished. Please wait while the results are being saved.\r\n", - ); CHECKPOINT .lock() .as_mut() @@ -1636,7 +1633,6 @@ impl App { || stored_static.pivot_keyword_list_flag || stored_static.computer_metrics_flag) { - println!(); let mut log_records = detection.add_aggcondition_msges(&self.rt, stored_static); if stored_static.is_low_memory { let empty_ids = HashSet::new(); @@ -1653,6 +1649,13 @@ impl App { afterfact_info.tl_starttime = tl.stats.start_time; afterfact_info.tl_endtime = tl.stats.end_time; + let msg = if stored_static.output_path.is_some() { + "Scanning finished. Please wait while the results are being saved.\n" + } else { + "Scanning finished.\n" + }; + pb.finish_with_message(msg); + // output afterfact if stored_static.is_low_memory { afterfact::output_additional_afterfact(