Commit 701da0f9 by devttys0

Fixed one-of-many bug when scanning multiple files containing one-of-many signatures

parent fd55d7f7
...@@ -430,6 +430,9 @@ class Magic(object): ...@@ -430,6 +430,9 @@ class Magic(object):
# Regex rule to find periods (see self._do_math) # Regex rule to find periods (see self._do_math)
self.period = re.compile("\.") self.period = re.compile("\.")
def reset(self):
self.display_once = set()
def _filtered(self, text): def _filtered(self, text):
''' '''
Tests if a string should be filtered out or not. Tests if a string should be filtered out or not.
......
...@@ -134,6 +134,9 @@ class Signature(Module): ...@@ -134,6 +134,9 @@ class Signature(Module):
self.one_of_many = None self.one_of_many = None
def scan_file(self, fp): def scan_file(self, fp):
self.one_of_many = None
self.magic.reset()
while True: while True:
(data, dlen) = fp.read_block() (data, dlen) = fp.read_block()
if dlen < 1: if dlen < 1:
......
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