Commit bfd3f886 by devttys0

Fixed magic.py duplicates bug; fixed binvis python3 bug.

parent d1527895
...@@ -754,8 +754,8 @@ class Magic(object): ...@@ -754,8 +754,8 @@ class Magic(object):
# If this offset has already been matched to a previous signature, ignore it unless # If this offset has already been matched to a previous signature, ignore it unless
# self.show_invalid has been specified. Also ignore obviously invalid offsets (<1) # self.show_invalid has been specified. Also ignore obviously invalid offsets (<1)
# as well as those outside the specified self.data range (dlen). # as well as those outside the specified self.data range (dlen).
#if (offset not in matched_offsets or self.show_invalid) and offset >= 0 and offset < dlen: if (offset not in matched_offsets or self.show_invalid) and offset >= 0 and offset < dlen:
if offset >= 0 and offset < dlen: #if offset >= 0 and offset < dlen:
# Analyze the data at this offset using the current signature rule # Analyze the data at this offset using the current signature rule
tags = self._analyze(signature, offset) tags = self._analyze(signature, offset)
......
...@@ -98,7 +98,7 @@ class Plotter(Module): ...@@ -98,7 +98,7 @@ class Plotter(Module):
# If the number of data points exceeds the maximum number of allowed data points, use a # If the number of data points exceeds the maximum number of allowed data points, use a
# weighting system to eliminate data points that occur less freqently. # weighting system to eliminate data points that occur less freqently.
if sum(data_points.itervalues()) > self.max_points: if sum(data_points.values()) > self.max_points:
# First, generate a set of weight values 1 - 10 # First, generate a set of weight values 1 - 10
for i in range(1, 11): for i in range(1, 11):
......
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