Here is tautech's run in v3.11... I ran it as model SDS1104X-E and SDS1000X-E. Then, I corrected the code "'" on the model number and ran it all again. Still no joy, but we will keep at it.
Edit: #### added after running it, of course.
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>>
>>> SCOPEID = '000225480f4#####'
>>> Model = ‘SDS1000X-E'
File "<stdin>", line 1
Model = ‘SDS1000X-E'
^
SyntaxError: invalid character '‘' (U+2018)
>>>
>>> bwopt = ('25M', '40M', '50M', '60M', '70M', '100M', '150M', '200M', '250M',
... '300M', '350M', '500M', '750M', '1000M', 'MAX', 'AWG', 'WIFI', 'MSO',
... 'FLX', 'CFD', 'I2S', '1553', 'PWA', 'MANC', 'SENT')
>>>
>>> hashkey = '5zao9lyua01pp7hjzm3orcq90mds63z6zi5kv7vmv3ih981vlwn06txnjdtas3u2wa8msx61i12ueh14t7kqwsfskg032nhyuy1d9vv2wm925rd18kih9xhkyilobbgy'
>>>
>>>
>>> def gen(x):
... h = hashlib.md5((hashkey + (Model + '\n').ljust(32, '\x00') + opt.ljust(
... 5, '\x00') + 2 * ((SCOPEID + '\n').ljust(32, '\x00')) +
... '\x00' * 16).encode('ascii')).digest()
... key = ''
... for b in h:
... if (b <= 0x2F or b > 0x39) and (b <= 0x60 or b > 0x7A):
... m = b % 0x24
... b = m + (0x57 if m > 9 else 0x30)
... if b == 0x30: b = 0x32
... if b == 0x31: b = 0x33
... if b == 0x6c: b = 0x6d
... if b == 0x6f: b = 0x70
... key += chr(b)
... return key.upper()
...
>>> for opt in bwopt:
... print('{:5} {}'.format(opt, gen(SCOPEID)))