Created
December 8, 2020 16:49
-
-
Save miklosbagi/e0655392de617dd47e7214a5ef18f2ae to your computer and use it in GitHub Desktop.
Xiaomi Roborock rootpw decrypt (UART)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ -z "$1" ] && { echo "Give me the Xiaomi string (e.g. ZNDRTERCGVDD@XES)"; exit 1; } | |
key="55"; d=""; hex=`echo -n "$1" | od -An -tuC` | |
for c in $hex; do xor=$(($c^$key)); printf "\\$(printf '%03o' "$xor")"; done; echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment