Commit 6286612e by devttys0

Fixed rising/falling entropy edge trigger reset bug

parent 56f81816
......@@ -165,6 +165,11 @@ class Entropy(Module):
description = "%f" % entropy
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:
description = "Rising entropy edge (%f)" % entropy
display = self.display_results
......@@ -179,11 +184,6 @@ class Entropy(Module):
display = False
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),
file=fp,
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