Closed teebow1e closed 4 months ago
The yr_compiler
object which is wrapped by Compiler
can't be re-used after producing a compiled rule set. This is not strictly a bug in go-yara (although we could guard against this).
If you want to update your ruleset at run-time, you'll have to create a fresh Compiler
and pass all rule files to it.
Hi, I'm trying your go-yara library and testing whether it suits my use-case. Here is the ideas I'm trying to do:
So, before trying any goroutine to automate the process of detecting new YARA files being added, I tried to live-load a new rule during runtime inside the code like this:
My implementation is causing the program to panic. Here is the panic message:
By removing one
c.GetRules()
, the program works fine again.Can you point out where I did things wrong? I assume that compiler.GetRules() should only be called once; but how can I achieve my goal? Thanks in advance.