diff --git a/py/Cargo.toml b/py/Cargo.toml index 43994c01e..7f5060628 100644 --- a/py/Cargo.toml +++ b/py/Cargo.toml @@ -19,6 +19,7 @@ crate-type = ["cdylib"] console-module = ["yara-x/console-module"] crx-module = ["yara-x/crx-module"] cuckoo-module = ["yara-x/cuckoo-module"] +dex-module = ["yara-x/dex-module"] dotnet-module = ["yara-x/dotnet-module"] elf-module = ["yara-x/elf-module"] hash-module = ["yara-x/hash-module"] @@ -39,6 +40,7 @@ default = [ "crx-module", "cuckoo-module", "dotnet-module", + "dex-module", "elf-module", "hash-module", "lnk-module", diff --git a/py/src/lib.rs b/py/src/lib.rs index 7e2bc6616..088169120 100644 --- a/py/src/lib.rs +++ b/py/src/lib.rs @@ -66,6 +66,10 @@ enum SupportedModules { Pe, #[cfg(feature = "dotnet-module")] Dotnet, + #[cfg(feature = "crx-module")] + Crx, + #[cfg(feature = "dex-module")] + Dex, } /// Formats YARA rules. @@ -313,6 +317,14 @@ impl Module { SupportedModules::Dotnet => { yrx::mods::invoke_dyn::(data) } + #[cfg(feature = "crx-module")] + SupportedModules::Crx => { + yrx::mods::invoke_dyn::(data) + } + #[cfg(feature = "dex-module")] + SupportedModules::Dex => { + yrx::mods::invoke_dyn::(data) + } _ => return Ok(py.None().into_bound(py)), };