From e37371a0773095828b21ec9e318c0e63a3551910 Mon Sep 17 00:00:00 2001 From: Tanaka Zakku <71482215+YamatoSecurity@users.noreply.github.com> Date: Tue, 21 Jun 2022 11:00:32 +0900 Subject: [PATCH] update readme and option name --- CHANGELOG-Japanese.md | 2 +- CHANGELOG.md | 2 +- README-Japanese.md | 2 +- README.md | 2 +- src/detections/configs.rs | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG-Japanese.md b/CHANGELOG-Japanese.md index d61e70f1..30ac4b47 100644 --- a/CHANGELOG-Japanese.md +++ b/CHANGELOG-Japanese.md @@ -4,7 +4,7 @@ **新機能:** -- `--add-file-extensions` オプションの追加。evtx以外の拡張子を指定する事ができます。ただし、ファイルの中身の形式はevtxファイル形式である必要があります。 (#586) (@hitenkoku) +- `--target-file-ext` オプションの追加。evtx以外の拡張子を指定する事ができます。ただし、ファイルの中身の形式はevtxファイル形式である必要があります。 (#586) (@hitenkoku) **改善:** diff --git a/CHANGELOG.md b/CHANGELOG.md index cdd4b149..5b29f0f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ **New Features:** -- Added `--add-file-extensions` option. You can specify other extension exclude evtx extension. but file contents must be evtx format. (#586) (@hitenkoku) +- Added `--target-file-ext` option. You can specify additional file extensions to scan in addtition to the default `.evtx` files. For example, `--target-file-ext evtx_data` or multiple extensions with `--target-file-ext evtx1 evtx2`. (#586) (@hitenkoku) **Enhancements:** diff --git a/README-Japanese.md b/README-Japanese.md index d0babec0..a27bb786 100644 --- a/README-Japanese.md +++ b/README-Japanese.md @@ -331,7 +331,7 @@ OPTIONS: --RFC-3339 RFC 3339形式で日付と時刻を出力する (例: 2022-02-22 22:00:00.123456-06:00) --US-military-time 24時間制(ミリタリータイム)のアメリカ形式で日付と時刻を出力する (例: 02-22-2022 22:00:00.123 -06:00) --US-time アメリカ形式で日付と時刻を出力する (例: 02-22-2022 10:00:00.123 PM -06:00) - --add-file-extensions ... evtx以外の拡張子を解析対象に追加する。 (例: evtx_data) + --target-file-ext ... evtx以外の拡張子を解析対象に追加する。 (例1: evtx_data 例2:evtx1 evtx2) --all-tags 出力したCSVファイルにルール内のタグ情報を全て出力する -c, --config ルールフォルダのコンフィグディレクトリ (デフォルト: ./rules/config) --contributors コントリビュータの一覧表示 diff --git a/README.md b/README.md index 30f9548c..15546cb2 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,7 @@ OPTIONS: --RFC-3339 Output timestamp in RFC 3339 format (ex: 2022-02-22 22:00:00.123456-06:00) --US-military-time Output timestamp in US military time format (ex: 02-22-2022 22:00:00.123 -06:00) --US-time Output timestamp in US time format (ex: 02-22-2022 10:00:00.123 PM -06:00) - --add-file-extensions ... Specify target file extension expclude evtx (ex: evtx_data) + --target-file-ext ... Specify additional target file extensions (ex: evtx_data) (ex: evtx1 evtx2) --all-tags Output all tags when saving to a CSV file -c, --config Specify custom rule config folder (default: ./rules/config) --contributors Print the list of contributors diff --git a/src/detections/configs.rs b/src/detections/configs.rs index ddeaddad..883d7858 100644 --- a/src/detections/configs.rs +++ b/src/detections/configs.rs @@ -31,7 +31,7 @@ lazy_static! { Regex::new(r"^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$").unwrap(); pub static ref TERM_SIZE: Option<(Width, Height)> = terminal_size(); pub static ref TARGET_EXTENSIONS: HashSet = - get_target_extensions(CONFIG.read().unwrap().args.add_file_extentions.as_ref()); + get_target_extensions(CONFIG.read().unwrap().args.evtx_file_ext.as_ref()); } pub struct ConfigReader<'a> { @@ -208,9 +208,9 @@ pub struct Config { #[clap(long)] pub contributors: bool, - /// Specify target file extension expclude evtx (ex: evtx_data) - #[clap(long = "add-file-extensions", multiple_values = true)] - pub add_file_extentions: Option>, + /// Specify additional target file extensions (ex: evtx_data) (ex: evtx1 evtx2) + #[clap(long = "target-file-ext", multiple_values = true)] + pub evtx_file_ext: Option>, } impl ConfigReader<'_> { @@ -459,7 +459,7 @@ pub fn load_pivot_keywords(path: &str) { }); } -/// --add-file-extensionsで追加された拡張子から、調査対象ファイルの拡張子セットを返す関数 +/// --target-file-extで追加された拡張子から、調査対象ファイルの拡張子セットを返す関数 pub fn get_target_extensions(arg: Option<&Vec>) -> HashSet { let mut target_file_extensions: HashSet = arg.unwrap_or(&Vec::new()).iter().cloned().collect();