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
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep mongo | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist | |
launchctl remove homebrew.mxcl.mongodb-community | |
pkill -f mongod |
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
import qrcode | |
import sqlite3 | |
conn = sqlite3.connect('databases') | |
c = conn.cursor() | |
for idx, (email, secret, issuer) in enumerate(c.execute("SELECT email,secret,issuer FROM accounts").fetchall()): | |
url = 'otpauth://totp/{}?secret={}&issuer={}'.format(email, secret, issuer) | |
print url | |
im = qrcode.make(url) | |
im.save('{}.png'.format(idx)) |