update readme and option name
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
**新機能:**
|
||||
|
||||
- `--add-file-extensions` オプションの追加。evtx以外の拡張子を指定する事ができます。ただし、ファイルの中身の形式はevtxファイル形式である必要があります。 (#586) (@hitenkoku)
|
||||
- `--target-file-ext` オプションの追加。evtx以外の拡張子を指定する事ができます。ただし、ファイルの中身の形式はevtxファイル形式である必要があります。 (#586) (@hitenkoku)
|
||||
|
||||
**改善:**
|
||||
|
||||
|
||||
+1
-1
@@ -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:**
|
||||
|
||||
|
||||
+1
-1
@@ -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 <ADD_FILE_EXTENTIONS>... evtx以外の拡張子を解析対象に追加する。 (例: evtx_data)
|
||||
--target-file-ext <EVTX_FILE_EXT>... evtx以外の拡張子を解析対象に追加する。 (例1: evtx_data 例2:evtx1 evtx2)
|
||||
--all-tags 出力したCSVファイルにルール内のタグ情報を全て出力する
|
||||
-c, --config <RULE_CONFIG_DIRECTORY> ルールフォルダのコンフィグディレクトリ (デフォルト: ./rules/config)
|
||||
--contributors コントリビュータの一覧表示
|
||||
|
||||
@@ -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 <ADD_FILE_EXTENTIONS>... Specify target file extension expclude evtx (ex: evtx_data)
|
||||
--target-file-ext <EVTX_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 <RULE_CONFIG_DIRECTORY> Specify custom rule config folder (default: ./rules/config)
|
||||
--contributors Print the list of contributors
|
||||
|
||||
@@ -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<String> =
|
||||
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<Vec<String>>,
|
||||
/// Specify additional target file extensions (ex: evtx_data) (ex: evtx1 evtx2)
|
||||
#[clap(long = "target-file-ext", multiple_values = true)]
|
||||
pub evtx_file_ext: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
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<String>>) -> HashSet<String> {
|
||||
let mut target_file_extensions: HashSet<String> =
|
||||
arg.unwrap_or(&Vec::new()).iter().cloned().collect();
|
||||
|
||||
Reference in New Issue
Block a user