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
This commit is contained in:
forgedhallpass 2021-10-05 16:49:55 +03:00
parent 4d34513881
commit 404f8ebb27

View File

@ -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{}
}