* added twitter badge and link #519 * Fixed clipy err Co-authored-by: garigariganzy <tosada31@hotmail.co.jp>
This commit is contained in:
@@ -13,8 +13,11 @@
|
||||
[tag-4]: https://img.shields.io/badge/Black%20Hat%20Arsenal-Asia%202022-blue
|
||||
[tag-5]: https://rust-reportcard.xuri.me/badge/github.com/Yamato-Security/hayabusa
|
||||
[tag-6]: https://img.shields.io/badge/Maintenance%20Level-Actively%20Developed-brightgreen.svg
|
||||
[tag-7]: https://img.shields.io/badge/Twitter-00acee?logo=twitter&logoColor=white
|
||||
|
||||
![tag-1] ![tag-2] <a href="https://github.com/Yamato-Security/hayabusa/releases">![tag-3]</a> ![tag-4]
|
||||
<a href="https://rust-reportcard.xuri.me/report/github.com/Yamato-Security/hayabusa">![tag-5]</a> ![tag-6] <a href="https://twitter.com/SecurityYamato">![tag-7]</a>
|
||||
|
||||
![tag-1] ![tag-2] ![tag-3] ![tag-4] ![tag-5] ![tag-6]
|
||||
|
||||
# Hayabusa について
|
||||
|
||||
|
||||
@@ -13,8 +13,10 @@
|
||||
[tag-4]: https://img.shields.io/badge/Black%20Hat%20Arsenal-Asia%202022-blue
|
||||
[tag-5]: https://rust-reportcard.xuri.me/badge/github.com/Yamato-Security/hayabusa
|
||||
[tag-6]: https://img.shields.io/badge/Maintenance%20Level-Actively%20Developed-brightgreen.svg
|
||||
[tag-7]: https://img.shields.io/badge/Twitter-00acee?logo=twitter&logoColor=white
|
||||
|
||||
![tag-1] ![tag-2] ![tag-3] ![tag-4] ![tag-5] ![tag-6]
|
||||
![tag-1] ![tag-2] <a href="https://github.com/Yamato-Security/hayabusa/releases">![tag-3]</a> ![tag-4]
|
||||
<a href="https://rust-reportcard.xuri.me/report/github.com/Yamato-Security/hayabusa">![tag-5]</a> ![tag-6] <a href="https://twitter.com/SecurityYamato">![tag-7]</a>
|
||||
|
||||
# About Hayabusa
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ use crate::yaml::ParseYaml;
|
||||
use hashbrown;
|
||||
use hashbrown::HashMap;
|
||||
use serde_json::Value;
|
||||
use std::fmt::Write;
|
||||
use std::io::BufWriter;
|
||||
use std::sync::Arc;
|
||||
use tokio::{runtime::Runtime, spawn, task::JoinHandle};
|
||||
@@ -290,28 +291,31 @@ impl Detection {
|
||||
ret.push_str(" in timeframe");
|
||||
}
|
||||
|
||||
ret.push_str(&format!(" [result] count:{}", agg_result.data));
|
||||
let _ = write!(ret, " [result] count:{}", agg_result.data);
|
||||
if agg_condition._field_name.is_some() {
|
||||
ret.push_str(&format!(
|
||||
let _ = write!(
|
||||
ret,
|
||||
" {}:{}",
|
||||
agg_condition._field_name.as_ref().unwrap(),
|
||||
agg_result.field_values.join("/")
|
||||
));
|
||||
);
|
||||
}
|
||||
|
||||
if agg_condition._by_field_name.is_some() {
|
||||
ret.push_str(&format!(
|
||||
let _ = write!(
|
||||
ret,
|
||||
" {}:{}",
|
||||
agg_condition._by_field_name.as_ref().unwrap(),
|
||||
agg_result.key
|
||||
));
|
||||
);
|
||||
}
|
||||
|
||||
if exist_timeframe {
|
||||
ret.push_str(&format!(
|
||||
let _ = write!(
|
||||
ret,
|
||||
" timeframe:{}",
|
||||
rule.yaml["detection"]["timeframe"].as_str().unwrap()
|
||||
));
|
||||
);
|
||||
}
|
||||
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user