Remove long deprecated "Dell AMI" extractor

This commit is contained in:
RichardG867
2022-08-20 20:28:08 -03:00
parent 91ba79bbe4
commit 30e0efa106
2 changed files with 0 additions and 88 deletions

View File

@@ -552,7 +552,6 @@ def analyze_process(queue, formatter, scan_base, options):
analyzers.AwardAnalyzer(), # must run before PhoenixAnalyzer
analyzers.QuadtelAnalyzer(), # must run before PhoenixAnalyzer
analyzers.PhoenixAnalyzer(), # must run before AMIDellAnalyzer and AMIIntelAnalyzer
#analyzers.AMIDellAnalyzer(), # must run before AMIAnalyzer
analyzers.AMIUEFIAnalyzer(), # must run before AMIAnalyzer
analyzers.AMIAnalyzer(), # must run before AMIIntelAnalyzer
analyzers.AMIIntelAnalyzer(),

View File

@@ -572,93 +572,6 @@ class AMIAnalyzer(Analyzer):
return True
class AMIDellAnalyzer(AMIAnalyzer):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.vendor_id = 'AMIDell'
self.register_check_list([
(self._version_dell, RegexChecker),
])
def reset(self):
super().reset()
self._trap_signon_lines = 0
def can_handle(self, file_path, file_data, header_data):
if file_data[:9] == b'DELLBIOS\x00':
# DELLBIOS header contains the Dell version.
self.version = '11/11/92'
self.debug_print('DELLBIOS header present')
# Extract the version as a sign-on.
terminator_index = file_data.find(b'\x00', 10)
if terminator_index > -1:
self.signon = file_data[10:terminator_index].decode('ascii', 'ignore').strip()
if self.signon:
self.signon = 'BIOS Version ' + self.signon
return True
elif b'DELLXBIOS' in file_data and not re.search(
b'''att6300plus|'''
b'''Flash BIOS Update Program - Version |'''
b'''Technologies Ltd|'''
b'''Western Digital 32-bit disk driver \(WDCDRV\)''',
file_data):
# "att6300plus" (HIMEM.SYS)
# "Flash BIOS Update Program - Version " (FLASH.EXE)
# Substring of "Phoenix Technologies Ltd" (4xxT/M/L)
# "Western Digital 32-bit disk driver (WDCDRV)" (WDCDRV.386)
# The Dell version will be in the BIOS body.
self.version = '11/11/92'
self.debug_print('DELLXBIOS string present')
return True
return False
def _version_dell(self, line, match):
'''^BIOS Version (.+)'''
# Extract both Dell and Intel version numbers as a sign-on.
version = match.group(1).strip()
if version[1:2] == '.':
# Intel version on second line.
linebreak_index = self.signon.find('\n')
if linebreak_index > -1:
self.signon = self.signon[:linebreak_index]
self.signon = self.signon.rstrip() + '\n' + version
else:
# Dell version.
self.signon = match.group(0).rstrip() + '\n' + self.signon.lstrip()
return True
def _string_main(self, line, match):
# Prevent the AMI string detector from working here.
return False
def _signon_trigger(self, line, match):
'''^DELLXBIOS$'''
# Read sign-on on the next few lines.
self._trap_signon_lines = 1
return True
def _signon_line(self, line, match):
self._trap_signon_lines += 1
if self._trap_signon_lines == 4:
# Extract the sign-on as a string, and disarm the trap.
self.string = line.strip()
if self.string[:5] == 'Dell ':
self.string = self.string[5:]
self._trap_signon_lines = 0
return True
class AMIIntelAnalyzer(Analyzer):
_ami_pattern = re.compile(b'''AMIBIOS''')
_ami_version_pattern = re.compile(b'''AMIBIOSC(0[1-9][0-9]{2})''')