MylexAnalyzer: Update to use metadata

This commit is contained in:
RichardG867
2023-11-21 20:38:18 -03:00
parent d20a2aeee9
commit ec722505ae

View File

@@ -1914,7 +1914,7 @@ class MylexAnalyzer(Analyzer):
def __init__(self, *args, **kwargs):
super().__init__('Mylex', *args, **kwargs)
self._version_pattern = re.compile(b'''MYLEX ([\\x20-\\x7E]+) BIOS Version ([\\x20-\\x7E]+) ([0-9]{2}/[0-9]{2}/[0-9]{2})''')
self._version_pattern = re.compile(b'''MYLEX [\\x20-\\x7E]+ BIOS Version ([\\x20-\\x7E]+) ([0-9]{2}/[0-9]{2}/[0-9]{2})''')
def can_handle(self, file_path, file_data, header_data):
# Determine location of the identification block.
@@ -1923,13 +1923,13 @@ class MylexAnalyzer(Analyzer):
return False
# Extract version.
self.version = match.group(2).decode('cp437', 'ignore')
self.version = match.group(1).decode('cp437', 'ignore')
# Extract date as a string.
self.string = match.group(3).decode('cp437', 'ignore')
self.string = match.group(2).decode('cp437', 'ignore')
# Extract board name as a sign-on.
self.signon = match.group(1).decode('cp437', 'ignore')
# Extract full version string as metadata.
self.metadata.append(('ID', match.group(0).decode('cp437', 'ignore')))
return True