diff --git a/pkg/matchers/fuzz.go b/pkg/matchers/fuzz.go index 527a2caa..b4038365 100644 --- a/pkg/matchers/fuzz.go +++ b/pkg/matchers/fuzz.go @@ -4,9 +4,6 @@ import "github.com/sahilm/fuzzy" func IsMatchFuzz(pattern string, s []string) bool { matches := fuzzy.Find(pattern, s) - if len(matches) > 0 { - return true - } - return false + return len(matches) > 0 } diff --git a/pkg/teler/teler.go b/pkg/teler/teler.go index 1805a332..07f80ea2 100644 --- a/pkg/teler/teler.go +++ b/pkg/teler/teler.go @@ -34,14 +34,13 @@ func Analyze(options *common.Options, logs *gonx.Entry) (bool, map[string]string threat := reflect.ValueOf(&rsc.Threat[i]).Elem() cat := threat.FieldByName("Category").String() con := threat.FieldByName("Content").String() - exc := threat.FieldByName("Exclude").Bool() - datasets[cat] = map[string]string{} - datasets[cat]["content"] = con - - if exc { + if threat.FieldByName("Exclude").Bool() { continue } + + datasets[cat] = map[string]string{} + datasets[cat]["content"] = con } }