fixedtypo in yara

This commit is contained in:
Johannes Bülow 2025-07-24 20:11:55 +02:00
parent 9d869689d6
commit b46f1074dd
Signed by: jmb
GPG key ID: B56971CF7B8F83A6

View file

@ -21,7 +21,8 @@ func compileSourcesFromFiles() error {
return err
}
cmd := exec.Command("/usr/local/bin/yr", "compile","-path-as-namespace", "--relaxed-re-syntax", "--output", outputPath, root)
cmd := exec.Command("/usr/local/bin/yr", "compile","--path-as-namespace", "--relaxed-re-syntax", "--output", outputPath, root)
slog.Debug("Yara compile command", "cmd", cmd.String())
result, err := cmd.Output()
if err != nil {
slog.Error("Error compiling yara rules", "error", err, "result", string(result))
@ -46,6 +47,7 @@ func scanFile(fileName string) ([]string, error) {
return matched, err
}
cmd := exec.Command("/usr/local/bin/yr", "scan", "--output-format ndjson", "--print-namespace","--compiled-rules", outputPath, fullPath)
slog.Debug("Yara scan command", "cmd", cmd.String())
result, err := cmd.Output()
if err != nil {
slog.Error("Error scanning file with yara", "error", err, "file-uuid", fileName,"result", string(result))