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 utility that loads malware detection rules from a file and scans target data to identify matches.
@generates
def load_rules(filepath: str):
"""
Load YARA rules from a file.
Args:
filepath: Path to the YARA rules file
Returns:
A compiled rules object
Raises:
FileNotFoundError: If the rule file does not exist
SyntaxError: If the rule file contains invalid syntax
"""
pass
def scan_data(rules, data: bytes) -> list[str]:
"""
Scan binary data using compiled rules.
Args:
rules: Compiled rules object returned by load_rules()
data: Binary data to scan
Returns:
List of rule names that matched (empty list if no matches)
"""
passProvides YARA pattern matching capabilities for malware detection.