Python interface for YARA, a powerful malware identification and classification tool
Overall
score
85%
Evaluation — 85%
↓ 0.94xAgent success when using this tile
A command-line tool that compiles YARA rules with support for include directives and configurable include processing.
include directive with includes enabled successfully loads the included rule file. @testinclude directive with includes disabled treats the include as if it doesn't exist. @test@generates
The tool should accept command-line arguments:
--rule-file: Path to the main YARA rule file--enable-includes: Flag to enable include processing (default: enabled)--disable-includes: Flag to disable include processing--output: Optional path to save compiled rulesThe tool should compile the specified YARA rule file and print a success message or error details.
def compile_rules(rule_file_path: str, includes_enabled: bool = True) -> object:
"""
Compiles YARA rules from a file with configurable include processing.
Args:
rule_file_path: Path to the YARA rule file to compile
includes_enabled: Whether to process include directives (default: True)
Returns:
Compiled YARA rules object
Raises:
Exception: If compilation fails or file not found
"""
pass
def main():
"""
Main entry point for the command-line tool.
Parses arguments and compiles the specified YARA rule file.
"""
passProvides YARA pattern matching and rule compilation support.
Install with Tessl CLI
npx tessl i tessl/pypi-yara-pythonevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10