Skip to content

Instantly share code, notes, and snippets.

@ericswpark
Created September 12, 2021 16:12
Show Gist options
  • Save ericswpark/bf78fcb187b150b16c3d80f2c0f90f6f to your computer and use it in GitHub Desktop.
Save ericswpark/bf78fcb187b150b16c3d80f2c0f90f6f to your computer and use it in GitHub Desktop.
Bitwarden TOTP finder in Python
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