Skip to content

Instantly share code, notes, and snippets.

@quassy
Last active May 27, 2016 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quassy/2d98df79fb187626ae0d5004257d13b1 to your computer and use it in GitHub Desktop.
Save quassy/2d98df79fb187626ae0d5004257d13b1 to your computer and use it in GitHub Desktop.
TwoFactorAuth
$ twofactorauth
[DEBUG] Loading css file /usr/local/share/two-factor-auth/data/style.css
[DEBUG] [APP MENU] : adding gnome shell menu
[ERROR] Coudln't check if a table exists
[ERROR] no such table: providers
# App starts and looks fine, no entries of course
# I added a new entry with an invalid secret (called Google, secret code "abcde")
[ERROR] Canno't generate a two-factor auth code
[ERROR] Incorrect padding
[ERROR] Couldn't generate the code
[ERROR]
[ERROR] Canno't generate secret code
[ERROR]
# Nothing is displayed
# I try to add an entry with a valid secret (from GitHub)
# Nothing happens, list is still empty
# I try to kill it
^CTraceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/TwoFactorAuth/ui/listrow.py", line 120, in refresh_listbox
def refresh_listbox(self):
KeyboardInterrupt
^C^C^C
killall twofactorauth
Exception in thread GitHub:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.5/site-packages/TwoFactorAuth/ui/listrow.py", line 112, in run
self.regenerate_code()
File "/usr/local/lib/python3.5/site-packages/TwoFactorAuth/ui/listrow.py", line 126, in regenerate_code
label = self.row.get_children()[0].get_children()[1].get_children()[0]
IndexError: list index out of range
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/TwoFactorAuth/application.py", line 78, in do_activate
def do_activate(self, *args):
KeyboardInterrupt
# New terminal window, trying to run it again fails:
$ twofactorauth
[DEBUG] Loading css file /usr/local/share/two-factor-auth/data/style.css
# Nothing else happens (no window)
# After rebooting the system:
$ twofactorauth
[DEBUG] Loading css file /usr/local/share/two-factor-auth/data/style.css
[DEBUG] [APP MENU] : adding gnome shell menu
[ERROR] Canno't generate a two-factor auth code
[ERROR] Incorrect padding
[ERROR] Couldn't generate the code
[ERROR]
[ERROR] Canno't generate secret code
[ERROR]
# Both entries are displayed and clicking the copy icon works
# The Google entry (with an invalid key) returns "Couldn't generate the secret code" as the copied key
# This should be everything needed to install on a recent Ubuntu (including Budgie Remix)
sudo apt install git python3-pip autoconf
git clone https://github.com/bil-elmoussaoui/TwoFactorAuth && cd ./TwoFactorAuth
sudo pip3 install pyotp
./autogen.sh
make
sudo checkinstall # makes a deb so it's easier to remove again
twofactorauth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment