Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Keygen for Siglent Spectrum Analyzers
- # Beware:
- # > Only tested on SVA1015X
- # > Output features must be entered in lower case!
- import hashlib
- # You get this by running "SCOPEID?" at the SCPI prompt; Interface available via HTTP on the device IP address.
- SCOPEID = ''
- # Select one of the four options below. Beware the SVA1015X tested required 'SVA1000X' as the model.
- # 'SVA1000X','SVA1015X','SVA1032X','SVA1075X'
- Model = ''
- otheropt = ('AMK', 'EMI', 'DMA', 'AMA', 'DTF')
- hashkey = '5zao9lyua01pp7hjzm3orcq90mds63z6zi5kv7vmv3ih981vlwn06txnjdtas3u2wa8msx61i12ueh14t7kqwsfskg032nhyuy1d9vv2wm925rd18kih9xhkyilobbgy'
- def gen(x):
- h = hashlib.md5((
- hashkey +
- Model.ljust(32, '\x00') +
- opt.ljust(5, '\x00') +
- SCOPEID.ljust(32, '\x00') +
- '\x00'*48).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.lower()
- for opt in otheropt:
- print('{:5} {}'.format(opt, gen(SCOPEID)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement