-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OP_OF_FOUND_AT. #1790
Add OP_OF_FOUND_AT. #1790
Conversation
Add support for "any of them at 0" constructs to the language. This allows users to avoid using long or chains like "$a at 0 or $b at 0" and also is a nicer way to write "for any of them: ($ at 0)".
This is mostly a syntactic sugar PR because someone at work asked if there was a nicer way than long If this is a good idea I'll update the docs before merging. |
I think this is good idea, also for completeness and coherency, because we have |
I was looking for this.
condition would be
Thanks! |
I wanted to ask one more question about this.
this condition doesn't work
this does work Apologies if this was covered in some other topic. |
You want to use The reason The idea of string sets is covered here: https://yara.readthedocs.io/en/stable/writingrules.html#sets-of-strings-1 (though the |
Thank you @wxsBSD. Yes, I went through the documentation many times.
|
Correct. If you have a lot of strings you want to check at a specific offset you can do it with a loop: 4.3.0 adds the shorter syntax version than the loop. |
Add support for "any of them at 0" constructs to the language. This allows users to avoid using long or chains like "$a at 0 or $b at 0" and also is a nicer way
to write "for any of them: ($ at 0)".