From 765b7d59efeb7346e97a2f514b9a3eb513951124 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Fri, 10 Jun 2022 17:14:51 +0900 Subject: [PATCH] fixed if logic hide-record-id #579 --- src/afterfact.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/afterfact.rs b/src/afterfact.rs index 51b0f318..9ee23bb9 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -1,6 +1,6 @@ use crate::detections::configs; use crate::detections::print; -use crate::detections::print::AlertMessage; +use crate::detections::print::{AlertMessage, IS_HIDE_RECORD_ID}; use crate::detections::utils; use crate::detections::utils::write_color_buffer; use chrono::{DateTime, Local, TimeZone, Utc}; @@ -423,11 +423,10 @@ fn _get_serialized_disp_output(dispformat: Option) -> String { "RuleTitle", "Details", ]; - let arg_match = &configs::CONFIG.read().unwrap().args; - if arg_match.is_present("display-record-id") { - titles.push("RecordID"); + if !*IS_HIDE_RECORD_ID { + titles.insert(5, "RecordID"); } - if arg_match.is_present("full-data") { + if configs::CONFIG.read().unwrap().args.is_present("full-data") { titles.push("RecordInformation"); } return format!("{}\n", titles.join("|"));