mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-29 19:29:42 +02:00
Generic: YaraScanner fail on no rules
This commit is contained in:
@@ -26,6 +26,8 @@ class YaraScanner(interfaces.layers.ScannerInterface):
|
||||
# yara.Rules isn't exposed, so we can't type this properly
|
||||
def __init__(self, rules) -> None:
|
||||
super().__init__()
|
||||
if rules is None:
|
||||
raise ValueError("No rules provided to YaraScanner")
|
||||
self._rules = rules
|
||||
|
||||
def __call__(self, data: bytes, data_offset: int) -> Iterable[Tuple[int, str, str, bytes]]:
|
||||
|
||||
Reference in New Issue
Block a user