VirusTotal / yara-x

A rewrite of YARA in Rust.
https://virustotal.github.io/yara-x/
BSD 3-Clause "New" or "Revised" License
565 stars 46 forks source link

Missing include function #128

Closed antime closed 1 month ago

antime commented 1 month ago

123 How to reference rules if they are distributed in two rule files?

I can use include in yara,but not work in yara-x

plusvic commented 1 month ago

If you compile two source files together (let's call them file1.yar and file2.yar), you can use a rule defined in file1.yar from file2.yar. This is done like:

yr scan file1.yar file2.yar <TARGET_PATH>
antime commented 1 month ago

I found the reason, it's because the rule file name cannot start with a number, which caused the problem. Thanks