Author Topic: Unified Keygen script for SIGLENT  (Read 1811 times)

0 Members and 2 Guests are viewing this topic.

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Unified Keygen script for SIGLENT
« on: June 25, 2024, 04:38:48 pm »
Hello all...

As I've gone through the process of "enhancing the capabilities" of my various Siglent equipment by entering mysterious keys into them, I - like many others - had to stumble through literally hundreds of pages in years-long threads where the process has changed over the years.  There seem to be an unlimited number of keygen scripts out there - some work for some models, some work for others.

The basic key generation methodology only differs slightly between models.  I kept pretty meticulous notes as I went about the process and I now have a "unified" script that will generate keys for the following models:
  • SDG2000X
  • SDS1000X-E
  • SDS2000X+
  • SDS800X-HD *-should work
  • SSA3000X_Plus
  • SVA1000X

I know this script to work for generating keys for these models because I have used it to "enhance the capabilities" of the models shown above personally and I've determined precisely which information is required for each model, how to obtain that information, how to use the information to generate the keys, and how to enter the keys into the various models.  The instructions in the script are precisely how I went about things with success.  Of course, YMMV.  This script is provided without warranty, yada, yada, yada...  Use at your own risk.  My offer of some lines of Python3 code does not imply my offer of support for that code.  8) Of course, $$$ changes everything! :-DD

With that said, here is the script.  Enjoy, and don't ever say I never gave you anything!
Code: [Select]
#! /usr/bin/env python3
#
# If your computer does not have Python3 installed, you can copy/paste this
# script into [url]https://www.programiz.com/python-programming/online-compiler/[/url]
# and run it there.
#
#
# Notes: [url]https://www.eevblog.com/forum/testgear/siglent-sds2000x-plus-hack/400/[/url]
#
#
# How to use this script:

# (1) Connect your device to your local network via its Ethernet port.
# Obtain the IP address of the device.  You will need this to connect to
# the SCPI interface for the device.
#
# On the SSA3000X_Plus platform,you will find this under
# System->Interface->LAN
# (You may need to enable DHCP or manually configure the IP addresss.)
#
# On the SDG2000X platform, you will find this under
# Utility->Interface->LAN Setup
# (You may need to set LAN State to ON and enable DHCP or manually configure
# the IP address.)
#
#
# (2) Connect to the SCPI interface of the device.
#
# Using your favorite telnet client (putty for example if you are using
# windows) connect to port 5024 of the device.
#
# If using Putty, select "telnet" as the protocol and set the port to 5024.
# Set the IP address to the IP address of your device.
#
# If using Linux or Mac, simply connect using the following command:
# telnet x.x.x.x 5024 (where x.x.x.x is the IP address of your device)
#
# Once connected to the SCPI interface, press ENTER several times.  You
# should now have a '>>' prompt, waiting for a SCPI command.  Note, SCPI
# commands do not include the quotes.  If instructed to send 'COMMAND',
# simply type COMMAND followed by the ENTER key. After each command, press
# the ENTER key until you see the '>>' prompt again.
#
# Note: While it is possible to send SCPI commands via the device web
# interface of some devices, I personally find telnet to port 5024 to be
# easier.  You may not.  Send the commands via whatever mechanism you choose.
#
#
# (3) You can skip this step for the SSA3000X_Plus platform.
#
# Query the current authorization code of the device and write it down with
# the 'MCBD?' SCPI command.  You will be comparing this code to the codes
# that the script generates for your device.  For example, if you purchased a
# SDG2042X, you will compare the code that the script returns for '40M' to the
# code that the device returned for the 'MCBD?' command.  They should match.
# If they don't match, you've done something wrong.
#
#
# (4) Get the Model by sending the 'MD5_PR?' command.  Model refers to the
# PLATFORM and not the exact model number.  For example, if you have a
# SDS1104X-E, you need to use SDS1000X-E.
# If your model is listed below, uncomment the appropriate line.  Otherwise,
# uncomment the blank Model line and enter the Model EXACTLY as returned by the
# device between the quotes.
#
#Model = 'SDG2000X'
#Model = 'SDS1000X-E'
Model = 'SDS2000X+'
#Model = 'SDS800X-HD'
#Model = 'SSA3000X_Plus'
#Model = 'SVA1000X'
#Model = ''
#
#
# (5) You can skip this step if you have selected 'SSA3000X_Plus' or
# 'SDG2000X' for Model in Step 4.
# If you have selected 'SDS1000X-E' or 'SDS800X-HD' for Model, set SN to
# the SN of your device. 
# This can be found by connecting your browser to the device. 
# Example: http://x.x.x.x where  x.x.x.x is the IP address of the device. 
# Enter the SN EXACTLY as shown by the device.
#
SN = 'xxxxxxxxxxxxxx'
#
#
# (6) Get the device ID.
# For the SDG2000X, SDS2000X+ or SDS800X-HD platforms, get the ID with the
# 'MD5_SRLN?' SCPI command.
#
# For the SSA3000X_Plus platform, get the ID with the 'SCOPEID?' SCPI
# command.
#
# Note: Enter the ID/SN without '-' between groups.
#
ID = ''
#
#
# (7) You can skip this step if you have set Model to 'SDS1000X-E',
# 'SDS2000X+', 'SDS800X-HD', 'SSA3000X_Plus', 'SVA1000X' or 'SDG2000X'
# above.
# If you have a model other than what is listed above,  you can manually
# set the keygen version for the script to use.  If one version  doesn't
# work for you, try the other.  Valid options  are '1', '2' or '3'. 
# Simply uncomment the following line and put the  version you want to use
# between the quotes.
#
#Keygen = ''
#
#
# (8) Run the script.  It will return a long list of codes.
#
#
# (9) Enter the codes.
#
# For the SSA3000X_Plus platform, go to System->System Info->Load Option
# and enter the key for the options you want to enable.  For example, on my
# SSA3021X Plus, I entered the keys for '3032' to enable 3.2GHz and 'ALL'
# to enable all other options.
#
# To increase the bandwidth on the the SDG2000X and SDS1000X-E platforms,
# send the code for the bandwidth you want to license to the device with the
# command 'MCBD <key>'
#
# For example, for my SDG2042X, I sent the code for '120M' and instantly
# turned my SDG2042X into a SDG2122X.  For my SDS1104X-E, I sent the code
# for '200M' and instantly turned my SDS1104X-E into a SDS1204X-E.
#
#
# To enter keys for options, use scpi command LCISL optioncode,hexkey
#
# To change bandwidth, use scpi command MCBD hexkey
#
# Note: enter the key EXACTLY as shown.
#
# To license AWG, MSO and WIFI options on the SDS1000X-E platform, enter the
# code by going to Utility page 3, Options.  Select the option you want to
# install and press Install.  Enter the  code exactly as shown by the script.
#
#
# (10) Enjoy your newly licensed features and/or bandwidth.
#
#


# These are the options known to me at the time I hobbled this script
# together from the various other scripts floating around.  There are
# probably other options that I've missed.  Your milage may vary.  I
# have successfully used the keys provided by this script to upgrade my
# SSA3021X_Plus, my SDG2042X and my SDS1104X-E.

bwopt = ('25M', '30M', '40M', '50M', '60M', '70M', '80M', '100M', '120M',
'150M', '200M', '250M', '300M', '350M', '500M', '750M', '1000M',
'3021', '3032', '3050', '3075', '3200')
otheropt = ('A429', 'AMA', 'AMK', 'ALL', 'AWG', 'CAT', 'CFD', 'DMA', 'DTF',
'EMI', 'FLX', 'I2S', 'INQU', 'MANC', 'MAX', 'MSO', 'PA', 'POWE',
'PULS', 'PWA', 'REF', 'Refl', 'RT40', 'SENT', 'TG', 'TRAI', 'TRUE',
'VNA', 'WIFI', '1553', '16LA')


# Do not edit anything below this line unless you REALLY know what you're doing.

import hashlib

# Set the Keygen version if we know which version to use based on the model.
if not 'Keygen' in locals():
if 'SDG2000X' in Model:
Keygen = '1'
if 'SDS2000X+' in Model:
Keygen = '1'
if 'SSA3000X_Plus' in Model:
Keygen = '2'
if 'SVA1000X' in Model:
Keygen = '2'
if 'SDS1000X-E' in Model:
Keygen = '3'
if 'SDS800X-HD' in Model:
Keygen = '3'

hashkey = '5zao9lyua01pp7hjzm3orcq90mds63z6zi5kv7vmv3ih981vlwn06txnjdtas3u2wa8msx61i12ueh14t7kqwsfskg032nhyuy1d9vv2wm925rd18kih9xhkyilobbgy'


def gen(HOSTID):
h = hashlib.md5((
hashkey +
(Model+'\n').ljust(32, '\x00') +
opt.ljust(5, '\x00') +
2*((HOSTID + '\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()


def gen2(SCOPEID):
    h = hashlib.md5((
        hashkey +
        Model.ljust(32, '\x00') +
        opt.ljust(5, '\x00') +
        SCOPEID.upper().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()


print("\nGenerating keys for '{}' platform with ID '{}'.\n"
  .format(Model, ID))
print("Note: Not all options/bandwidths are valid on all platforms.")

# Print out the keys...

if Keygen == "1":
print("\nBandwidth Options:\n------------------")
for opt in bwopt:
print('{:5} {}'.format(opt, gen(ID)))

print("\n\nOther Options:\n--------------")
for opt in otheropt:
print('{:5} {}'.format(opt, gen(ID)))

if Keygen == "2":
print("\nBandwidth Options:\n------------------")
for opt in bwopt:
print('{:5} {}'.format(opt, gen2(ID)))

print("\n\nOther Options:\n--------------")
for opt in otheropt:
print('{:5} {}'.format(opt, gen2(ID)))

if Keygen == "3":
print("\nBandwidth Options:\n------------------")
for opt in bwopt:
print('{:5} {}'.format(opt, gen(ID)))

print("\n\nOther Options:\n--------------")
for opt in otheropt:
print('{:5} {}'.format(opt, gen(SN).lower()))


Later!
« Last Edit: June 25, 2024, 06:23:16 pm by OP-SEC »
 
The following users thanked this post: egonotto, thm_w, coromonadalix, watchmaker

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #1 on: June 25, 2024, 04:49:25 pm »
This also works for the new SDS800X-HD scopes.  It is suggested to incrementally upgrade BW one step at a time and perform a factory default reset before upgrading to the next level.  Let the scope warm up for 30 minutes and run a full calibration after upgrading to the last BW option and entering the license keys.

I don't know if there is any evidence to base that on, but better safe than sorry and using this code and that method I successfully upgraded my SDS804X-HD to a SDS824X-HD.  For the SDS800X-HD series, you don't need all the other options listed in the original code list as none of them apply to these models - simply replace the entire line as shown below.

Model = 'SDS800X-HD'
...
bwopt = ('70M', '100M', '200M')
...
otheropt = ('AWG', 'MSO', 'PWA')

Edit - rather than set up a Python environment on my PC, I copied the code to the online Python compiler link below.  I have no affiliation with this site, but it was quick, easy and successful.

https://www.programiz.com/python-programming/online-compiler/

Edit2 - I find it very interesting that Siglent continues to use the same licensing / model encryption schema for their entry level gear...  The SDS800X-HD is obviously running newer OS code and you would have thought they would have secured this backdoor knowing so many people have taken advantage of it over the years.  Though I am very glad they have continued to do so ;-)
« Last Edit: June 25, 2024, 05:07:02 pm by TomKatt »
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PIC
 
The following users thanked this post: egonotto

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3254
  • Country: pt
Re: Unified Keygen script for SIGLENT
« Reply #2 on: June 25, 2024, 05:06:19 pm »
I - like many others - had to stumble through literally hundreds of pages in years-long threads where the process has changed over the years.  There seem to be an unlimited number of keygen scripts out there - some work for some models, some work for others.

Now there is one more and we can rest assured it still won't be the last. :)
 
The following users thanked this post: egonotto, KungFuJosh

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #3 on: June 25, 2024, 05:07:38 pm »
I - like many others - had to stumble through literally hundreds of pages in years-long threads where the process has changed over the years.  There seem to be an unlimited number of keygen scripts out there - some work for some models, some work for others.

Now there is one more and we can rest assured it still won't be the last. :)
In fairness, something like this really ought to be a sticky imo.  It's obviously a frequently sought out topic.
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PIC
 

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #4 on: June 25, 2024, 05:08:39 pm »
For the SDS800X-HD series, you don't need all the other options listed in the original code list as none of them apply to these models - simply replace the entire line as shown below.

Model = 'SDS800X-HD'
...
bwopt = ('70M', '100M', '200M')
...
otheropt = ('AWG', 'MSO', 'PWA')

I personally wouldn't edit the options lines to remove the other options.  Just simply enter the keys for the options you need.  I always expanded bandwidth first and then went for licensing options.  Also, be sure to try the "ALL" key first as it is known to work on some platforms and will certainly save you some time.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6136
  • Country: ca
Re: Unified Keygen script for SIGLENT
« Reply #5 on: June 25, 2024, 05:13:48 pm »
this script is incomplete   it does miss some options values ...

so far  what i've found across many threads / replies  and help from here



('25M', '30M', '40M', '50M', '60M', '70M', '100M', '120M', '150M', '200M', '250M', '300M', '350M', '500M', '750M', '1000M', '3200', 'AWG', 'FLX', 'CFD', 'I2S', '1553', 'FG', '16LA', 'INQU', 'MANC', 'MAX', 'MSO', 'PA', 'PWA', 'POWE', 'PULS', 'SENT', 'TRAI', 'WIFI')

the '3200'   worked for ssg3021x to  ssg3032x   and results are entered thru the keypad

TRAI is for PT option in ssg3000x series

'AWG' should be used for the 'FG' option

'SCOPEID'  can or could be the same as 'SN'

« Last Edit: June 25, 2024, 05:23:55 pm by coromonadalix »
 
The following users thanked this post: egonotto

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #6 on: June 25, 2024, 05:20:56 pm »
I - like many others - had to stumble through literally hundreds of pages in years-long threads where the process has changed over the years.  There seem to be an unlimited number of keygen scripts out there - some work for some models, some work for others.

Now there is one more and we can rest assured it still won't be the last. :)

Ya.  I realize that but, from what I've found, there are three different ways that the keys are generated.  If the platform you're trying to "enhance" isn't listed, simply provide MODEL, SN and ID fields (instructions in the script should help you find those with various SCPI commands) and then go through the various Keygen = values in step #7 of the instructions until you find the one that works.  I tried to make the script as extensible as possible. 

This also works for the new SDS800X-HD scopes.

Model = 'SDS800X-HD'

Which Keygen version does the SDS800X-HD use?  I'll edit the original post.  For the script I posted, if you use an "unknown" model (see lines 160-171 of the script), and don't specifically tell the script which Keygen version to use, it will not work and will actually give you an error.
 
The following users thanked this post: egonotto

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #7 on: June 25, 2024, 05:21:55 pm »
For the SDS800X-HD series, you don't need all the other options listed in the original code list as none of them apply to these models - simply replace the entire line as shown below.

Model = 'SDS800X-HD'
...
bwopt = ('70M', '100M', '200M')
...
otheropt = ('AWG', 'MSO', 'PWA')

I personally wouldn't edit the options lines to remove the other options.  Just simply enter the keys for the options you need.  I always expanded bandwidth first and then went for licensing options.  Also, be sure to try the "ALL" key first as it is known to work on some platforms and will certainly save you some time.
It just dawned on me that you created a 'new' script combining the various scripts into a single entity, so you need to ensure the model is defined in the Select Case code...

For reference, here is the forum post I referenced to generate the codes for my SDS800X-HD:
https://www.eevblog.com/forum/testgear/siglent-sds-sdg-hack-script
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PIC
 

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #8 on: June 25, 2024, 05:24:29 pm »
this script is incomplete   it does miss some options values ...

Thank you for your very insightful reply.  Do you care to tell me which options are missing and which category (bwopt or otheropt) they belong in?

Also, please see the following comment in the script comments:
Code: [Select]
# These are the options known to me at the time I hobbled this script
# together from the various other scripts floating around.  There are
# probably other options that I've missed.  Your milage may vary.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6136
  • Country: ca
Re: Unified Keygen script for SIGLENT
« Reply #9 on: June 25, 2024, 05:33:31 pm »
'30M' and     '3200'


i myself may have missed a few things,   1st time i see the keygen option 1 2 3  ...   

and yes this thread should be pinned,  there is a scope python script and another  i've been told ... i was fooled by theses   loll

threads get so diluted  here and there ...
« Last Edit: June 25, 2024, 06:09:31 pm by coromonadalix »
 

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #10 on: June 25, 2024, 05:47:44 pm »
For reference, here is the forum post I referenced to generate the codes for my SDS800X-HD:
https://www.eevblog.com/forum/testgear/siglent-sds-sdg-hack-script

Um, there are two different scripts there.  Which one did you use for your SDS800X-HD?

Or, if you look at the script you used and just send me the lines that look like this:
Code: [Select]
def gen(x):
    h = hashlib.md5((
        hashkey +
        (Model+'\n').ljust(32, '\x00') +
        opt.ljust(5, '\x00') +
        2*((SN + '\n').ljust(32, '\x00')) +
        '\x00'*16).encode('ascii')
    ).digest()
...and this...
Code: [Select]
for opt in bwopt:
    print('{:5} {}'.format(opt, gen(SN)))
...and this...
Code: [Select]
for opt in otheropt:
    print('{:5} {}'.format(opt, gen(SN)))

...I'll be able to tell which permitation of keygen that model needs to use and I'll update the script.  Note: The lines in the script you use may not look EXACTLY like that but, you'll be able to tell which section of code I'm interested in...

I need to know which options we're passing to function gen and then, there are a couple different flavors of function gen that are slightly different.
 

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #11 on: June 25, 2024, 05:51:10 pm »
Um, there are two different scripts there.  Which one did you use for your SDS800X-HD?
The first one labeled 'Script for Siglent Digital Oscilloscopes' is the one I used for my SDS800X-HD scope.  I just replaced the Model and 2 option lines with the information pertinent to my device as the other options did not apply.

The other code is for Waveform Generators.

EDIT - I forgot to mention, but you should also reiterate testing the codes produced by the script to verify they match the code from your gear when you run a MCBD? query command.  That ensures everything is correct and there is no chance of buggering things up by entering a wrong or invalid code.  For example, before attempting to upgrade my scope, I compared the 70M option code generated by the script to my scope's MCBD? query result (70 MHz being the default factory BW of my SDS804X-HD).  The first time I ran the script these codes did not match because I had made a typo entering my serial number.  Whether that could cause issues or not I do not know, but it is reassuring to know that once the script can generate the same MCBD? query result the other options are bound to be correct as well.
« Last Edit: June 25, 2024, 06:03:59 pm by TomKatt »
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PIC
 

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #12 on: June 25, 2024, 05:55:55 pm »
'30M' and     '3200'

I've updated the script in the original post to include those and also to support the SDS800X-HD.
Can someone with a SDS800X-HD do me a favor and do the following to verify the SDS800X-HD?

Configure the script to use Model = 'SDS800X-HD', add your SN and ID and run the script.
Connect to the SCPI interface on your scope and run the 'MCBD?' command.
Compare the results returned for the 'MCBD?' command to the code the script provides for the BW option you have on your scope.  They should match.  If not, I can figure out what is wrong but, will require some information that I'll ask for in PM from you if you're willing.
« Last Edit: June 25, 2024, 06:17:15 pm by OP-SEC »
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6136
  • Country: ca
Re: Unified Keygen script for SIGLENT
« Reply #13 on: June 25, 2024, 06:08:43 pm »
hi again

all i've found and put in the script, played with option orders in the script to help reading it

milleage may vary  ....  not sure if some are in double  like 'REF' and 'Refl'  ??

 

bwopt = ('25M', '30M', '40M', '50M', '60M', '70M', '80M', '100M', '120M', '150M', '200M', '250M', '300M', '350M', '500M', '750M', '1000M', '3021', '3032', '3050', '3075', '3200')

otheropt = ('1553', '16LA', 'A429', 'AMA', 'AMK', 'ALL', 'AWG', 'CAT', 'CFD', 'DMA', 'DTF', 'EMI', 'FLX', 'I2S', 'INQU', 'MANC', 'MAX', 'MSO', 'PA', 'POWE', 'PULS', 'PWA', 'REF', 'Refl', 'RT40', 'SENT', 'TG', 'TRAI', 'TRUE', 'VNA', 'WIFI')


models so far ?      would be nice for people if they can confirm ?

Model   'SDG1000X', 'SDG2000X', 'SDS800X-HD', 'SSG3000X',  'SDS1000X-E', 'SDS2000X-E', 'SDS2000X+', 'SDS5000X', 'ZODIAC-, 'SSG3000X', 'SSA3000X_Plus', 'SVA1000X'


« Last Edit: June 25, 2024, 06:35:41 pm by coromonadalix »
 

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #14 on: June 25, 2024, 06:18:30 pm »
milleage may vary  ....  not sure if some are in double  like 'REF' and 'Refl'  ??
I don't think it matters if you have duplicates - the codes are generated based on the ascii txt label for the options so the worst that happens there is that one code fails and you use the other...

I've updated the script in the original post to include those and also to support the SDS800X-HD.
Can someone with a SDS800X-HD do me a favor and do the following to verify the SDS800X-HD?
I can try later tonight when I get home...
« Last Edit: June 25, 2024, 06:20:31 pm by TomKatt »
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PIC
 
The following users thanked this post: coromonadalix

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6136
  • Country: ca
Re: Unified Keygen script for SIGLENT
« Reply #15 on: June 25, 2024, 06:22:12 pm »
Q:   is the keygen option MUST be used   

because   some tryouts comparing your script  vs the one i tought the most universal  but without keygen options i'm doing is failing


NameError: name 'Keygen' is not defined

and sadly   some of the tests  vs  keygen #1 or #2 or #3     for an ssg3000x  doesn't match  what i've got  with another keygen ?

EDIT  :    put the SERIAL NUMBER  into the ID section too


SSG3000X seems a different beast, this script with many tryouts,  does not work / give the same results i noted ??

here's what worked for me

---------------------------------------------------------

import hashlib

#  Serial and or SCOPEID can or could be case sensitive

#SCOPEID  can be the HOST ID  in System Info
SCOPEID = 'SSG3XHDCxxxxxxx'
SN = 'SSG3XHDCxxxxxxx'
Model   = 'SSG3000X'

# Apparently Answers must be entered in lowercase
# SCOPEID  van be the serial number too,  or the HOST ID  numbers.
# SEEMS to work for SSG3000X series, but enter theses answers thru the front panel touchscreen, MCDB xxxxx scpi command are not working.

# Note that 'AWG' should be used for the 'FG' option
# If you have the 100 MHz model, then first upgrade it to 200 MHz, then 350 MHz and finally 500 MHz

bwopt = ('3200', 'TRAI')

# TRAI is for PT option in ssg3000x series

hashkey = '5zao9lyua01pp7hjzm3orcq90mds63z6zi5kv7vmv3ih981vlwn06txnjdtas3u2wa8msx61i12ueh14t7kqwsfskg032nhyuy1d9vv2wm925rd18kih9xhkyilobbgy'

def gen(x):
    h = hashlib.md5((
        hashkey +
        (Model+'\n').ljust(32, '\x00') +
        x.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:
    n = 4
    line = gen(opt)
    print('{:5} {}'.format(opt, [line[i:i+n] for i in range(0, len(line), n)]))

« Last Edit: June 25, 2024, 06:43:28 pm by coromonadalix »
 

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #16 on: June 25, 2024, 06:41:33 pm »
OK.  I've updated the original post with all of the options and also added the SDS800X-HD as an option.

models so far ?      would be nice for people if they can confirm ?

Model   'SDG1000X', 'SDG2000X', 'SDS800X-HD', 'SSG3000X',  'SDS1000X-E', 'SDS2000X-E', 'SDS2000X+', 'SDS5000X', 'ZODIAC-, 'SSG3000X', 'SSA3000X_Plus', 'SVA1000X'

Yes.  If people can test the following, that would be great:
SDS800X-HD
SSG3000X
SDS2000X-E
SDS5000X
ZODIAC-


Steps to test:

Connect to the SCPI interface on your scope and run the 'MCBD?' command.
Write down the results.

Configure the script with your Model, SN and ID (instructions in the script for how to find these).

In step #7, Uncomment the Keygen = '' and set it to '1', '2' or '3'. (You may have to try all three) to find the right one.

Run the script.

Compare the results you got from the 'MCBD?' command to the key the script generated for that bandwidth option.  If they match, tell me which Model = and which Keygen = version you used.

Note: There is only a slight difference between Keygen versions 1 and 3.  They will generate the same exact keys for "Bandwidth Options".  They differ in the keys generated for "Other Options" so, we'll need someone who hasn't already licensed all of their other options to determine which Keygen version produces the correct "Other Options" keys in the event of an unknown device that uses either Keygen = '1' or Keygen = '3'.

Once we have confirmed working results, I will update the script in the original post.
 
The following users thanked this post: egonotto, coromonadalix

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6136
  • Country: ca
Re: Unified Keygen script for SIGLENT
« Reply #17 on: June 25, 2024, 06:48:03 pm »
one thing who can help

do note your keys  before and after ...          as written by OP-SEC

EDIT    EX:   for SDG1000x   30M  to 60M,   once the script gives you numbers,  do a check with available commands  BEFORE upgrading,  that way you'll see if the script is okay or wrong ....

same for SDS1000X-E scopes   
« Last Edit: June 25, 2024, 08:41:43 pm by coromonadalix »
 
The following users thanked this post: egonotto

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #18 on: June 25, 2024, 07:13:31 pm »
For folks who want the script to support a platform that isn't already listed as supported, you can help in the following way:

Send me (PM) the following info that you have provided to whatever script you used:

Model =
SN = (Not used in all scripts)
ID = (might be HOSTID or SCOPEID.... You get the idea.)
What does your device BELIEVE it is licensed for as far as BW?
What is the output of the SCPI command MCBD? on your device?
And finally, if you have a known working option key (not bandwidth but, something like AWG, MSO, etc) for your device, send me that key.  I can determine what the script needs to do on your platform given the above information.
 
The following users thanked this post: egonotto

Offline hansibull

  • Regular Contributor
  • *
  • Posts: 117
  • Country: no
Re: Unified Keygen script for SIGLENT
« Reply #19 on: June 25, 2024, 07:20:55 pm »
If the script works with the SDS800X HD, it will also work for the SDS1000X HD.

And the options for the SDS1000X HD is 100M or 200M, MSO, AWG and PWA

Now let's hope that a public keygen for the SDS2000X HD and SDS3000X HD will be available someday.
« Last Edit: June 25, 2024, 07:27:06 pm by hansibull »
 
The following users thanked this post: egonotto

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #20 on: June 25, 2024, 07:35:58 pm »
If the script works with the SDS800X HD, it will also work for the SDS1000X HD. I know because I own a 1000X HD.

And the options for the SDS1000X HD is 100M or 200M, MSO, AWG and PWA

Can you test the script and compare the keys it gives you for those options to what you know to work?
You'll need to set Keygen = '1' or Keygen = '3' in step #7 (Uncomment the line).  I think '3' is going to be the correct one.

You'll need to set Model, ID and SN accordingly as well.
Get Model with the 'MD5_PR?' command.
Get SN either with the 'SRLN?' command or from the webserver of the device.
Get ID with the 'MD5_SRLN?' or 'SCOPEID?' command.  It may also be listed on the device webserver info page as well.

None of the fields should have '-' in them so, if the command returns something with '-' separating groups of letters/numbers, enter the letters/numbers in the field exactly as returned EXCEPT leave out the '-'.


Note to all: You only need to uncomment and set the Keygen = '' line if your model is not listed in the section right below the line that says, "if not 'Keygen' in locals():"... I tried to make the script easy to use and also as extensible as possible.  I realize that not everyone is a python programmer though.
 
The following users thanked this post: egonotto, coromonadalix

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6136
  • Country: ca
Re: Unified Keygen script for SIGLENT
« Reply #21 on: June 25, 2024, 08:09:13 pm »
@  hansibull
so far the v2 licensing is on a tight lips,  very few people have it,  as of now will not share it ...
« Last Edit: June 25, 2024, 08:12:58 pm by coromonadalix »
 

Offline hansibull

  • Regular Contributor
  • *
  • Posts: 117
  • Country: no
Re: Unified Keygen script for SIGLENT
« Reply #22 on: June 25, 2024, 08:14:41 pm »
It was tricky to get the script to produce the correct keys for the SDS1000X HD, but I did manage to get it working in the end.

First, I couldn't use the actual scope serial number. I had to use the output of MD5_SRLN? for both SN and ID in the script.
BTW the names for these variables are very confusing. It's very easy to mic up the MD5_SRLN? and the serial number that's actually written on the back of the instrument. Keygen = 3 is the correct option for this scope.

Here's a few thoughts if you want to make the script as fail safe as possible for the user:

  • Create a promt so that the user can type in, or select their model, e.g SDS1000X-HD, device serial number (written on the back) and the output of MD5_SRLN?.
  • When the script knows which instrument the user wants to generate keys for, only print the options that that particular instrument supports
  • At the end, make it very clear that the user should make sure the output of MCBD? should match one of the possible bandwidth license keys that have just been generated
« Last Edit: June 25, 2024, 08:24:23 pm by hansibull »
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 28804
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Unified Keygen script for SIGLENT
« Reply #23 on: June 25, 2024, 08:51:03 pm »

Yes.  If people can test the following, that would be great:
SDS800X-HD
SSG3000X
SDS2000X-E
SDS5000X
ZODIAC-


The existing 2 scripts work for most entry level models but NOT for SDS5000X with late firmware.
V2 licensing is used for all higher level products.
Avid Rabid Hobbyist.
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline OP-SECTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Re: Unified Keygen script for SIGLENT
« Reply #24 on: June 25, 2024, 09:00:35 pm »
@  hansibull
so far the v2 licensing is on a tight lips,  very few people have it,  as of now will not share it ...

Just to be clear, the Keygen variable in my script doesn’t refer to a licensing version.  It only refers to one of the three (so far) different ways I’ve determined that the v1 keys are generated for various platforms.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf