You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow metadata to contain a list of values (VirusTotal#201)
The `Rules.match` function now receives an optional `allow_duplicate_metadata=True` argument, which changes the structure of `Match.meta`. By default `Match.meta` is a dictionary with metadata names and their corresponding values, if a metadata name appears duplicated in a rule, the last value will be used. For example, consider the following rule:
```yara
rule demo {
meta:
foo = "foo VirusTotal#1"
foo = "foo VirusTotal#2"
bar = "bar"
condition:
false
}
```
In that case `Match.meta` would be `{"foo": "foo VirusTotal#2", "bar": "bar"}` by default (`allow_duplicate_metadata=False`), but with `allow_duplicate_metadata=True` it would be: `{"foo": ["foo VirusTotal#1", "foo VirusTotal#2"], "bar": ["bar"]}`.
0 commit comments