Skip to content

Instantly share code, notes, and snippets.

@wuub
Created November 10, 2015 14:40
Show Gist options
  • Save wuub/b81b929013265ff68eb4 to your computer and use it in GitHub Desktop.
Save wuub/b81b929013265ff68eb4 to your computer and use it in GitHub Desktop.
hacky script to generate terminal qrcodes for totp auth's from csv file
import pyqrcode
import csv
template = "otpauth://totp/{name}?secret={secret}"
with open("keys.csv") as f:
for k in csv.DictReader(f):
qr = pyqrcode.create(template.format(secret=k['secret'], name=k['email']))
print(k['email'])
print(qr.terminal(quiet_zone=1))
raw_input("next>>> ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment