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

Compiled rule with error: invalid UTF-8 #127

Closed antime closed 1 month ago

antime commented 1 month ago

When i compile the rules and use the compiled rules to scan a file, one erroe occured with invalid UTF-8 character. But use the original rule scan the same file, it is normal.

plusvic commented 1 month ago

For reference for future users landing here: this is because you must use the --compiled-rules option (or -C) to tell the scan command that the input is not a source file, but a binary file with compiled rules. Otherwise, it will try to read the binary file as a source file.