Add extra logging to decrypt failure.

This commit is contained in:
Cossid
2025-12-06 13:39:02 -06:00
parent b983ad99b6
commit 32bfc2256f

View File

@@ -213,7 +213,7 @@ class DetachHandler(TuyaServerHandler):
body = self.get_argument('data')
body = bytes.fromhex(body)
decrypted = self.cipher.decrypt(body, key_choice).decode('utf-8')
except:
print(f"[!] Unable to decrypt device reponse. PSKKEY/AUTHKEY do not match device.")
except Exception as e:
print(f"[!] Unable to decrypt device reponse. PSKKEY/AUTHKEY do not match device - {e}")
exit(90)
return decrypted