From 22b36314a3cb6c45207ab0712105c3cec4e1ef46 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Wed, 10 Nov 2021 22:55:37 +0900 Subject: [PATCH] removed filepath extension #162 (#181) --- src/afterfact.rs | 2 +- src/detections/print.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afterfact.rs b/src/afterfact.rs index f76e1cca..9cdad1aa 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -167,7 +167,7 @@ fn test_emit_csv() { let expect = "Time,Filepath,Rulepath,Level,Computername,Eventid,Alert,Details\n".to_string() + &expect_tz.clone().format("%Y-%m-%dT%H:%M:%S%:z").to_string() + "," - + testfilepath + + &testfilepath.replace(".evtx", "").to_string() + "," + testrulepath + "," diff --git a/src/detections/print.rs b/src/detections/print.rs index cd2fe93b..e39f7150 100644 --- a/src/detections/print.rs +++ b/src/detections/print.rs @@ -50,7 +50,7 @@ impl Message { event_detail: String, ) { let detect_info = DetectInfo { - filepath: target_file, + filepath: target_file.replace(".evtx", ""), rulepath: rule_path, level: level, computername: computername,