diff --git a/biostools/extractors.py b/biostools/extractors.py index ec3a952..eeebcde 100644 --- a/biostools/extractors.py +++ b/biostools/extractors.py @@ -2777,14 +2777,14 @@ class VMExtractor(PEExtractor): # Known signatures. self._floppy_pattern = re.compile( - b'''( FastPacket V[0-9])|''' # Siemens Nixdorf FastPacket + b'''(?P FastPacket V[0-9])|''' # Siemens Nixdorf FastPacket b''', Sydex, Inc\\. All Rights Reserved\\.|''' # IBM Sydex b'''Disk eXPress Self-Extracting Diskette Image|''' # HP DXP - b'''(\\x00Diskette Image Decompression Utility(?: +v%s|\\.)\\x00)|''' # NEC in-house - b'''(Copyright Daniel Valot |\\x00ARDI - \\x00)|''' # IBM ARDI - b'''(Ready to build distribution image with the following attributes:)|''' # Zenith in-house - b'''(Error reading the Softpaq File information)|''' # Compaq Softpaq - b'''((?:Intel Flash Memory Update Utility|DELLXBIOS[\\x00-\\xFF]+;C_FILE_INFO)[\\x00-\\xFF]+<>)''' # Dell in-house + b'''(?P\\x00Diskette Image Decompression Utility(?: +v%s|\\.)\\x00)|''' # NEC in-house + b'''(?PCopyright Daniel Valot |\\x00ARDI - \\x00)|''' # IBM ARDI + b'''(?PReady to build distribution image with the following attributes:)|''' # Zenith in-house + b'''(?PError reading the Softpaq File information)|''' # Compaq Softpaq + b'''(?PIntel Flash Memory Update Utility|DELLXBIOS[\\x00-\\xFF]+;C_FILE_INFO)[\\x00-\\xFF]+<>''' # Dell in-house ) self._eti_pattern = re.compile(b'''[0-9\\.\\x00]{10}[0-9]{2}/[0-9]{2}/[0-9]{2}\\x00{2}[0-9]{2}:[0-9]{2}:[0-9]{2}\\x00{3}''') self._rompaq_pattern = re.compile(b'''[\\x00-\\xFF]{12}[A-Z0-9]{7}\\x00[0-9]{2}/[0-9]{2}/[0-9]{2}\\x00''') @@ -2933,7 +2933,7 @@ class VMExtractor(PEExtractor): floppy_media = 'floppy.144' # Copy original file and blank floppy image to the destination directory. - if match.group(6): # Dell in-house names the extracted file after the executable + if match.group('dell'): # Dell in-house names the extracted file after the executable exe_name = 'dell.exe' else: exe_name = util.random_name(8, charset=util.random_name_nosymbols).lower() + '.exe' @@ -2946,7 +2946,7 @@ class VMExtractor(PEExtractor): # Create batch file for calling the executable. bat_path = os.path.join(dest_dir, 'autoexec.bat') f = open(bat_path, 'wb') - if match.group(2): # NEC in-house + if match.group('nec'): # This SFX has trouble with (at least) the FreeDOS memory manager. # Work around that by moving config.sys out of the way to disable the # memory manager, rebooting the system, then executing the SFX proper. @@ -2958,23 +2958,23 @@ class VMExtractor(PEExtractor): f.write(b':sfx\r\n') f.write(b'move /y config.old config.sys\r\n') # just in case again (snapshot shouldn't persist changes) f.write(b'echo 0|') # later revision prompts for standard or LS-120 drive - elif match.group(3): # ARDI + elif match.group('ardi'): f.write(b'echo.|') - elif match.group(4) or match.group(6): # Zenith in-house, Dell in-house + elif match.group('zenith') or match.group('dell'): f.write(b'a:\r\n') - elif match.group(5): # Compaq Softpaq + elif match.group('softpaq'): # Create flag file for sending the monitor commands. flag_name = util.random_name(8, charset=util.random_name_nosymbols).lower() + '.dat' flag_path = os.path.join(dest_dir, flag_name) f.write(b'echo. >d:\\' + flag_name.encode('cp437', 'ignore') + b'\r\n') f.write(b'd:' + exe_name.encode('cp437', 'ignore')) - if match.group(1): # FastPacket + if match.group('fastpacket'): f.write(b' /b a:\r\n') - elif match.group(3) or match.group(5): # ARDI or Compaq Softpaq + elif match.group('ardi') or match.group('softpaq'): f.write(b'\r\n') - elif match.group(4): # Zenith in-house + elif match.group('zenith'): f.write(b' 0: try: