Synology script python

xavax

Chevalier Jedi
10 Mars 2021
162
6
18
Bonjour à tous,
je débute avec mon NAs Synology DS118 et je me demandais s'il était possible de faire ceci sur mon nas ?
mon nas est en DSM 7.0-41222.
Merci pour votre aide
Code:
XIAOMI CLOUD TOKENS EXTRACTOR
One of Home Assistant users wrote a tokens extractor tool, which is currently the easiest way to retrieve tokens for all devices assigned to Xiaomi account. In the repository there’s executable for convenient use on Windows or Python script to be run on any platform. If you do not wish to run executable, then you can run it using the source code:

Install requirements:
pip3 install pycryptodome pybase64 requests
Bash
Run script
python3 token_extractor.py
Bash
Provide e-mail address or username for Xiaomi’s account, password and country of the account (most used: CN - China Mainland, DE - Germany etc.)
Script will print out all devices connected to the account with their IP address and tokens for use in Home Assistant.