banksy-git / lidl-gateway-freedom

Freeing the Silvercrest (Lidl/Tuya) Smart Home Gateway from the cloud.
https://paulbanks.org/projects/lidl-zigbee/
GNU General Public License v3.0
206 stars 66 forks source link

Can't decrypt Root Password using lidl_auskey_decode.py #35

Closed burgsth closed 1 year ago

burgsth commented 1 year ago

When I run lidl_auskey_decode.py I'm always getting an error message. I've already tried two different systems

Encoded aus-key as hex string line 1>80000000:       ECBF6766        4674D1E7        06711FE1        C43E49B7
Encoded aus-key as hex string line 2>80000010:       FA011E25        563B2EA3        BE57D96F        19E3CFE1
Traceback (most recent call last):
  File "/tmp/lidl-gateway-freedom-Release-1.2/scripts/lidl_auskey_decode.py", line 58, in <module>
    cipher = AES.new(kek, AES.MODE_ECB)
  File "/usr/local/lib/python3.10/dist-packages/Crypto/Cipher/AES.py", line 95, in new
    return AESCipher(key, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/Crypto/Cipher/AES.py", line 59, in __init__
    blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
    self._cipher = factory.new(key, *args, **kwargs)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

Both systems running different Ubuntu versions but the result is the same. I also tried to enter KEK and AUSKEY without leading 800000x0 or without blanks. It brings up always the same error.

burgsth commented 1 year ago

I've used the version comes with release 1.2 and tried the one on the webpage (v0.2). In v0.3 everything works fine.