Here’s what I did:
- Download the decrypt script:
curl -SLO https://raw.githubusercontent.com/Alamot/code-snippets/master/crypto/xorknown.py
- Make it executable:
chmod +x ./xorknown.py
- Get encrypted data and convert to ascii:
curl -s http://[APPLIANCE-IP]/http-read.json?encrypted=1 | xxd -r -p > ./crypted.txt
- Decrypt data:
./xorknown.py ./crypted.txt '{"status' 16
The script will return partially decrypted data, go on adding known text to improve it.
Problem is that the API returns its data localized. Because of this you can not always use the same string.
I had to use '{"statusHob":{"S
as complete string since I own an induction hob and the first field of the object was not WiFiStatus
but StatoWiFi
.
The complete result is:
{
"statusHob": {
"StatoWiFi": "1",
"Z1status": "0",
"Z1pan": "0",
"Z1hot": "0",
"Z1combi": "0",
"Z1low": "0",
"Z1power": "0",
"Z1error": "00",
"Z1timeh": "0",
"Z1timem": "0",
"Z2status": "0",
"Z2pan": "0",
"Z2hot": "0",
"Z2combi": "0",
"Z2low": "0",
"Z2power": "0",
"Z2error": "00",
"Z2timeh": "0",
"Z2timem": "0",
"Z3status": "0",
"Z3pan": "0",
"Z3hot": "0",
"Z3combi": "0",
"Z3low": "0",
"Z3power": "0",
"Z3error": "00",
"Z3timeh": "0",
"Z3timem": "0",
"Z4status": "1",
"Z4pan": "1",
"Z4hot": "0",
"Z4combi": "0",
"Z4low": "0",
"Z4power": "1",
"Z4error": "00",
"Z4timeh": "7",
"Z4timem": "59",
"lock": "0",
"alarmh": "0",
"alarmm": "0"
}
}