Created
September 12, 2021 16:12
-
-
Save ericswpark/bf78fcb187b150b16c3d80f2c0f90f6f to your computer and use it in GitHub Desktop.
Bitwarden TOTP finder in Python
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
import json | |
accounts = [] | |
print("Reading exported JSON...") | |
with open("bitwarden-export.json", "r", encoding="utf8") as export_file: | |
vault = json.load(export_file) | |
vault = vault["items"] | |
for item in vault: | |
if item["type"] == 1: | |
if item["login"]["totp"]: | |
accounts.append((item['name'], item['login']['username'])) | |
print("Transfer the following accounts:") | |
for account in accounts: | |
print("{} - {}".format(account[0], account[1])) | |
print("Regeneration of TOTP strongly recommended!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment