Commit 6286612e by devttys0

Fixed rising/falling entropy edge trigger reset bug

parent 56f81816
...@@ -165,6 +165,11 @@ class Entropy(Module): ...@@ -165,6 +165,11 @@ class Entropy(Module):
description = "%f" % entropy description = "%f" % entropy
if not self.config.verbose: if not self.config.verbose:
if last_edge in [None, 0] and entropy > self.trigger_low:
trigger_reset = True
elif last_edge in [None, 1] and entropy < self.trigger_high:
trigger_reset = True
if trigger_reset and entropy >= self.trigger_high: if trigger_reset and entropy >= self.trigger_high:
description = "Rising entropy edge (%f)" % entropy description = "Rising entropy edge (%f)" % entropy
display = self.display_results display = self.display_results
...@@ -179,11 +184,6 @@ class Entropy(Module): ...@@ -179,11 +184,6 @@ class Entropy(Module):
display = False display = False
description = "%f" % entropy description = "%f" % entropy
if last_edge in [None, 0] and entropy > self.trigger_low:
trigger_reset = True
elif last_edge in [None, 1] and entropy < self.trigger_high:
trigger_reset = True
r = self.result(offset=(file_offset + i), r = self.result(offset=(file_offset + i),
file=fp, file=fp,
entropy=entropy, entropy=entropy,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment