Merge branch 'main' into 592-config-flag-seems-to-be-ignored
This commit is contained in:
+16
-15
@@ -123,7 +123,7 @@ impl App {
|
||||
Ok(output) => {
|
||||
if output != "You currently have the latest rules." {
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
"Rules updated successfully.",
|
||||
)
|
||||
@@ -187,7 +187,7 @@ impl App {
|
||||
|
||||
if *STATISTICS_FLAG {
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
"Generating Event ID Statistics",
|
||||
)
|
||||
@@ -196,7 +196,7 @@ impl App {
|
||||
}
|
||||
if *LOGONSUMMARY_FLAG {
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
"Generating Logons Summary",
|
||||
)
|
||||
@@ -279,7 +279,7 @@ impl App {
|
||||
return;
|
||||
} else {
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
&configs::CONFIG.read().unwrap().headless_help,
|
||||
)
|
||||
@@ -291,7 +291,7 @@ impl App {
|
||||
let analysis_duration = analysis_end_time.signed_duration_since(analysis_start_time);
|
||||
println!();
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
&format!("Elapsed Time: {}", &analysis_duration.hhmmssxxx()),
|
||||
)
|
||||
@@ -346,15 +346,15 @@ impl App {
|
||||
)
|
||||
.ok();
|
||||
});
|
||||
write_color_buffer(BufferWriter::stdout(ColorChoice::Always), None, &output).ok();
|
||||
write_color_buffer(&BufferWriter::stdout(ColorChoice::Always), None, &output).ok();
|
||||
} else {
|
||||
//標準出力の場合
|
||||
let output = "The following pivot keywords were found:".to_string();
|
||||
write_color_buffer(BufferWriter::stdout(ColorChoice::Always), None, &output).ok();
|
||||
write_color_buffer(&BufferWriter::stdout(ColorChoice::Always), None, &output).ok();
|
||||
|
||||
pivot_key_unions.iter().for_each(|(key, pivot_keyword)| {
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
&create_output(String::default(), key, pivot_keyword),
|
||||
)
|
||||
@@ -442,7 +442,8 @@ impl App {
|
||||
fn print_contributors(&self) {
|
||||
match fs::read_to_string("./contributors.txt") {
|
||||
Ok(contents) => {
|
||||
write_color_buffer(BufferWriter::stdout(ColorChoice::Always), None, &contents).ok();
|
||||
write_color_buffer(&BufferWriter::stdout(ColorChoice::Always), None, &contents)
|
||||
.ok();
|
||||
}
|
||||
Err(err) => {
|
||||
AlertMessage::alert(&format!("{}", err)).ok();
|
||||
@@ -458,7 +459,7 @@ impl App {
|
||||
.min_level
|
||||
.to_uppercase();
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
&format!("Analyzing event files: {:?}", evtx_files.len()),
|
||||
)
|
||||
@@ -684,7 +685,7 @@ impl App {
|
||||
Some(Color::Green)
|
||||
};
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
output_color,
|
||||
&content,
|
||||
)
|
||||
@@ -704,7 +705,7 @@ impl App {
|
||||
Some(path) => {
|
||||
let egg_path = CURRENT_EXE_PATH.join(path);
|
||||
let content = fs::read_to_string(egg_path).unwrap_or_default();
|
||||
write_color_buffer(BufferWriter::stdout(ColorChoice::Always), None, &content).ok();
|
||||
write_color_buffer(&BufferWriter::stdout(ColorChoice::Always), None, &content).ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -718,7 +719,7 @@ impl App {
|
||||
let hayabusa_rule_repo = Repository::open(Path::new("rules"));
|
||||
if hayabusa_repo.is_err() && hayabusa_rule_repo.is_err() {
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
"Attempting to git clone the hayabusa-rules repository into the rules folder.",
|
||||
)
|
||||
@@ -897,7 +898,7 @@ impl App {
|
||||
.entry(tmp[3].to_string())
|
||||
.or_insert(0b0) += 1;
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
&format!(
|
||||
"[Updated] {} (Modified: {} | Path: {})",
|
||||
@@ -914,7 +915,7 @@ impl App {
|
||||
Ok("Rule updated".to_string())
|
||||
} else {
|
||||
write_color_buffer(
|
||||
BufferWriter::stdout(ColorChoice::Always),
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
"You currently have the latest rules.",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user