tessl install tessl/pypi-yara-python@3.11.0Python interface for YARA, a powerful malware identification and classification tool
Agent Success
Agent success rate when using this tile
85%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.94x
Baseline
Agent success rate without this tile
90%
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.