From a112297e60e0d7de0eb6d6a6c02aaf821c9206da Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 2 Sep 2025 10:19:41 -0400 Subject: [PATCH] Detect ESXi editions for more specific fingerprinting --- confluent_server/confluent/osimage.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index f26eb13b..81fe2f3f 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -36,6 +36,7 @@ READFILES = set([ 'media.2/products', '.DISCINFO', '.discinfo', + 'ISOLINUX.CFG', 'zipl.prm', 'sources/idwbinfo.txt', ]) @@ -495,9 +496,24 @@ def check_esxi(isoinfo): _, version = line.split(b' ', 1) if not isinstance(version, str): version = version.decode('utf8') + edition = '' if isesxi and version: + if 'ISOLINUX.CFG' in isoinfo[1]: + for line in isoinfo[1]['ISOLINUX.CFG'].split(b'\n'): + if line.startswith(b'MENU TITLE'): + words = line.split() + if len(words) > 2: + edition = words[2].decode('utf8') + break + if edition: + for vnd in ('LNV', 'LVO', 'LVN'): + if edition.startswith(vnd): + edition = '_' + edition.split('-', 1)[1].strip() + break + else: + edition = '' return { - 'name': 'esxi-{0}'.format(version), + 'name': 'esxi-{0}{1}'.format(version, edition), 'method': EXTRACT, 'category': 'esxi{0}'.format(version.split('.', 1)[0]) }