From 404f8ebb2795aadc4f10069c28a1932c74d6613f Mon Sep 17 00:00:00 2001 From: forgedhallpass <13679401+forgedhallpass@users.noreply.github.com> Date: Tue, 5 Oct 2021 16:49:55 +0300 Subject: [PATCH] Fixes:Binary matcher always returns true if the input cannot be decoded as hex #1085 * changed the Log to Warn instead of Error, so it wouldn't show up in the output without the verbose flag --- v2/pkg/operators/matchers/match.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/pkg/operators/matchers/match.go b/v2/pkg/operators/matchers/match.go index 8da6f6a56..fff0055de 100644 --- a/v2/pkg/operators/matchers/match.go +++ b/v2/pkg/operators/matchers/match.go @@ -120,7 +120,7 @@ func (m *Matcher) MatchBinary(corpus string) (bool, []string) { // Continue if the word doesn't match hexa, err := hex.DecodeString(binary) if err != nil { - gologger.Error().Msgf("Could not hex encode the given binary matcher value: '%s'", binary) + gologger.Warning().Msgf("Could not hex encode the given binary matcher value: '%s'", binary) if m.condition == ANDCondition { return false, []string{} }