1
2
3
4
5
import yara

rules = yara.compile(filepath="rules.yar")
matches = rules.match("sample.exe")
print(matches)