Created
February 22, 2024 19:55
-
-
Save d-rk/3a616a3a31d5a122776706d32068c51b to your computer and use it in GitHub Desktop.
Convert encrypted aegis backup to keepassxc compatible csv file
This file contains hidden or 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
# download decrypt script | |
curl -L https://raw.githubusercontent.com/beemdevelopment/Aegis/master/docs/decrypt.py > decrypt.py | |
# copy encrypted backup | |
scp host:/path/to/backup/aegis-backup-20231122-082604.json aegis-backup.json | |
# decrypt backup | |
python3 decrypt.py --input aegis-backup.json --output aegis-backup-decrypted.json | |
# convert to keepassxc compatible csv file | |
cat aegis-backup-decrypted.json | jq -r '["Group", "Title", "TOTP"], (.entries[] | [ .group, (.issuer + " - " + .name), ("otpauth://totp/" + (.name | @uri) + ":none?secret=" + .info.secret + "&period=" + (.info.period|tostring) + "&digits=" + (.info.digits|tostring) + "&issuer=" + (.issuer | @uri) )]) | @csv' > aegis-backup.csv | |
# finally run keepassxc and import from csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment