Updated script. Easier to read, no capital keys, added some comments. Worked for me still.
```
import hashlib
# Scope identification found in the system info tab
# to find this, touch the utility tab on the top left of the SDS screen.
# The dropdown will have a "Menu" option. This will open a dropdown on the right,
# select the (i) System Info from the dropdown.
# The "Scope ID:" hosts this variable. Remove the hyphens and keep the value lowercase.
SCOPEID = 'agy4mj75hf6jnd52'
# The model is a generic variable, not a specific model number, in this case the SDS2000X+,
Model = 'SDS2000X+'
bwopt = ('100M', '200M', '350M', '500M', 'AWG', '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 index, b in enumerate(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
# every four characters print a space
if index and index % 4 == 0:
key += " "
key += chr(b)
return key
for opt in bwopt:
print(f'{opt}: {gen(SCOPEID)}\n')
```