Update: read messages from rules/**.toml
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use crate::detections::utils;
|
||||
use crate::models::event;
|
||||
use crate::detections::print::MESSAGES;
|
||||
use regex::Regex;
|
||||
use std::collections::HashMap;
|
||||
extern crate csv;
|
||||
|
||||
pub struct PowerShell {}
|
||||
|
||||
@@ -25,6 +25,10 @@ impl PowerShell {
|
||||
if event_id != "4103" {
|
||||
return;
|
||||
}
|
||||
|
||||
let message = MESSAGES.lock().unwrap();
|
||||
println!("{}", message.return_message("4103"));
|
||||
|
||||
let default = String::from("");
|
||||
let commandline = event_data.get("ContextInfo").unwrap_or(&default);
|
||||
|
||||
@@ -48,6 +52,9 @@ impl PowerShell {
|
||||
if event_id != "4104" {
|
||||
return;
|
||||
}
|
||||
let message = MESSAGES.lock().unwrap();
|
||||
println!("{}", message.return_message("4104"));
|
||||
|
||||
let default = String::from("");
|
||||
let path = event_data.get("Path").unwrap().to_string();
|
||||
if path == "".to_string() {
|
||||
|
||||
Reference in New Issue
Block a user