From 3b585846dd79ab3a55684171202844564af1fb3b Mon Sep 17 00:00:00 2001 From: cooperq Date: Mon, 29 Jun 2020 12:38:44 -0700 Subject: [PATCH] update yaya and fix API --- README.md | 4 ++++ yaya.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 75714ad..d837583 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Automatically curate open source yara rules and run scans ## Installation `go get github.com/cooperq/yaya` + `go install github.com/cooperq/yaya` ### Dependencies @@ -14,6 +15,9 @@ Yaya depends on the following packages outside the standard library: * https://github.com/hillu/go-yara * https://github.com/jinzhu/gorm +You must also install the yara4 C libraries. We reccomend you install these from source: +https://yara.readthedocs.io/en/stable/gettingstarted.html + ## Running yaya update diff --git a/yaya.go b/yaya.go index bfa59de..148adfa 100644 --- a/yaya.go +++ b/yaya.go @@ -351,7 +351,8 @@ func runScan(scanPath string) { log.Panicf("Failed to compile rules: %s", err) } for path, matches := range scanResults { - results, err := rules.ScanFile(path, 0, 0) + var results yara.MatchRules + err := rules.ScanFile(path, 0, 0, &results) if err != nil { Warning(err) }