Python interface for YARA, a powerful malware identification and classification tool
Overall
score
85%
Evaluation — 85%
↓ 0.94xAgent success when using this tile
A system that scans large binary files for specific patterns using pre-compiled pattern matching rules. The scanner must handle files efficiently without unnecessary memory copies.
The scanner should process large binary files using memory-efficient techniques that avoid duplicating data in memory.
The scanner should work with buffer objects representing binary data, allowing efficient processing of pre-loaded data.
@generates
def scan_file(rules, filepath: str) -> list:
"""
Scans a file using the provided compiled rules.
Args:
rules: Compiled pattern matching rules
filepath: Path to the file to scan
Returns:
A list of match results
"""
pass
def scan_buffer(rules, buffer) -> list:
"""
Scans a buffer containing binary data using the provided compiled rules.
Should efficiently handle memoryview objects without copying data.
Args:
rules: Compiled pattern matching rules
buffer: A buffer-like object (bytes, bytearray, memoryview) containing data to scan
Returns:
A list of match results
"""
passProvides pattern matching and scanning capabilities.
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