PiotrMachowski / Xiaomi-cloud-tokens-extractor

This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices.
MIT License
3.23k stars 333 forks source link

Add shared houses support #66

Closed roncapat closed 1 year ago

roncapat commented 2 years ago

Fixes #65 Moreover, it lets the user import the class from another scripts and adds a static method useful to decrypt data with nonce obtained from packet dumps.

I used "Packet Capture" Android App to get to the solution. I am able to reverse a big part of the REST API now since I've built myself a script to do so: if other features are needed I can dig into the decrypted logs to identify endpoints/params.

PiotrMachowski commented 2 years ago

Nice work! 👍

Rittsel commented 2 years ago

This didn't initially work for me because device_info returned None for my first empty "home" so I never got to the shared one. Changed line 292 to the following fixed it.

if devices["result"]["device_info"] is None or len(devices["result"]["device_info"]) == 0:

roncapat commented 1 year ago

Any news for merging?

PiotrMachowski commented 1 year ago

Thanks, @roncapat!