workin on new filters

This commit is contained in:
zach rice committed 2019-04-11 18:06:18 -05:00
1 parent 4c20d5d85c
commit 256ace38d7
9 files changed
+139 -191

No files matched your search

-27
View File
@@ -23,30 +23,3 @@ func getShannonEntropy(data string) (entropy float64) {
return entropy
}
func entropyIsHighEnough(entropy float64) bool {
if entropy >= opts.Entropy && len(config.Entropy.entropyRanges) == 0 {
return true
}
for _, eR := range config.Entropy.entropyRanges {
if entropy > eR.v1 && entropy < eR.v2 {
return true
}
}
return false
}
func highEntropyLineIsALeak(line string) bool {
if !opts.NoiseReduction {
return true
}
for _, re := range config.Entropy.regexes {
if re.FindString(line) != "" {
return true
}
}
return false
}