* added color code emit_csv test * replaced HashMap and HashSet to hashbrown #368 * removed debug output in test #368 * fixed colored test
This commit is contained in:
@@ -13,8 +13,8 @@ use crate::detections::utils::get_serde_number_to_string;
|
|||||||
use crate::filter;
|
use crate::filter;
|
||||||
use crate::yaml::ParseYaml;
|
use crate::yaml::ParseYaml;
|
||||||
use hashbrown;
|
use hashbrown;
|
||||||
|
use hashbrown::HashMap;
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::io::BufWriter;
|
use std::io::BufWriter;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::{runtime::Runtime, spawn, task::JoinHandle};
|
use tokio::{runtime::Runtime, spawn, task::JoinHandle};
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ use self::selectionnodes::{
|
|||||||
AndSelectionNode, NotSelectionNode, OrSelectionNode, RefSelectionNode, SelectionNode,
|
AndSelectionNode, NotSelectionNode, OrSelectionNode, RefSelectionNode, SelectionNode,
|
||||||
};
|
};
|
||||||
use super::selectionnodes;
|
use super::selectionnodes;
|
||||||
use std::{collections::HashMap, sync::Arc};
|
use hashbrown::HashMap;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref CONDITION_REGEXMAP: Vec<Regex> = vec![
|
pub static ref CONDITION_REGEXMAP: Vec<Regex> = vec![
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ use crate::detections::print::Message;
|
|||||||
|
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
|
|
||||||
use std::{collections::HashMap, fmt::Debug, sync::Arc, vec};
|
use hashbrown::HashMap;
|
||||||
|
use std::{fmt::Debug, sync::Arc, vec};
|
||||||
|
|
||||||
use yaml_rust::Yaml;
|
use yaml_rust::Yaml;
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ use crate::detections::configs;
|
|||||||
use crate::detections::print::AlertMessage;
|
use crate::detections::print::AlertMessage;
|
||||||
use crate::detections::print::ERROR_LOG_STACK;
|
use crate::detections::print::ERROR_LOG_STACK;
|
||||||
use crate::detections::print::QUIET_ERRORS_FLAG;
|
use crate::detections::print::QUIET_ERRORS_FLAG;
|
||||||
|
use hashbrown::HashSet;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::collections::HashSet;
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::BufWriter;
|
use std::io::BufWriter;
|
||||||
use std::io::{BufRead, BufReader};
|
use std::io::{BufRead, BufReader};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::detections::{configs, detection::EvtxRecordInfo, utils};
|
use crate::detections::{configs, detection::EvtxRecordInfo, utils};
|
||||||
use std::collections::HashMap;
|
use hashbrown::HashMap;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct EventStatistics {
|
pub struct EventStatistics {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use crate::detections::{configs, detection::EvtxRecordInfo};
|
use crate::detections::{configs, detection::EvtxRecordInfo};
|
||||||
|
|
||||||
use super::statistics::EventStatistics;
|
use super::statistics::EventStatistics;
|
||||||
use std::collections::HashMap;
|
use hashbrown::HashMap;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Timeline {
|
pub struct Timeline {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use crate::detections::print::AlertMessage;
|
|||||||
use crate::detections::print::ERROR_LOG_STACK;
|
use crate::detections::print::ERROR_LOG_STACK;
|
||||||
use crate::detections::print::QUIET_ERRORS_FLAG;
|
use crate::detections::print::QUIET_ERRORS_FLAG;
|
||||||
use crate::filter::RuleExclude;
|
use crate::filter::RuleExclude;
|
||||||
use std::collections::HashMap;
|
use hashbrown::HashMap;
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io;
|
use std::io;
|
||||||
@@ -269,7 +269,7 @@ mod tests {
|
|||||||
use crate::filter;
|
use crate::filter;
|
||||||
use crate::yaml;
|
use crate::yaml;
|
||||||
use crate::yaml::RuleExclude;
|
use crate::yaml::RuleExclude;
|
||||||
use std::collections::HashSet;
|
use hashbrown::HashSet;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use yaml_rust::YamlLoader;
|
use yaml_rust::YamlLoader;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user