From 5d75da5324b2660fedc6623b694a2fc5219ba7cc Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 22 Nov 2023 20:48:36 -0300 Subject: [PATCH] AwardAnalyzer: Add another AST detection and safeguard --- biostools/analyzers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/biostools/analyzers.py b/biostools/analyzers.py index 2e0fcba..aaef4ee 100644 --- a/biostools/analyzers.py +++ b/biostools/analyzers.py @@ -790,8 +790,9 @@ class AwardAnalyzer(Analyzer): def __init__(self, *args, **kwargs): super().__init__('Award', *args, **kwargs) + # Interleaved "Award Software Inc." (AST) # "COPYRIGHT AWARD SOFTWARE INC." (early XT/286) - self._award_pattern = re.compile(b'''(?:Award|A w a r d) Software Inc\\.|COPYRIGHT AWARD SOFTWARE INC\\.|Award Decompression Bios''') + self._award_pattern = re.compile(b'''(?:Award|A w a r d) Software Inc\\.|AAwwaarrdd SSooffttwwaarree IInncc\\.\\.|COPYRIGHT AWARD SOFTWARE INC\\.|Award Decompression Bios''') self._ast_pattern = re.compile(b'''\\(c\\) COPYRIGHT 1984,[0-9]{4}(?:A w a r d|Award) Software Inc\\.|IBM COMPATIBLE A(S)T BIOS''') self._early_pattern = re.compile(b'''([0-9A-Z][\\x21-\\x7E]+) BIOS V([0-9.]+)[\\x21-\\x7E]* COPYRIGHT''') self._gigabyte_bif_pattern = re.compile(b'''\\$BIF[\\x00-\\xFF]{5}([\\x20-\\x7E]+)\\x00.([\\x20-\\x7E]+)\\x00''') @@ -964,6 +965,8 @@ class AwardAnalyzer(Analyzer): for line in lines: if line[:10] == 'Copyright ' or line[:19] == 'All Rights Reserved': continue + elif 'IBM IS A TRADEMARK OF INTERNATIONAL BUSINESS MACHINES CORP.' in line: + break self.signon += line + '\n' else: # Handle early XT/286 BIOS.