Skip to content

The Python Command-line Reimplementaion of Google Authenticator

License

Notifications You must be signed in to change notification settings

skywind3000/googauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preface

The Python Command-line Reimplementaion of Google Authenticator:

Get started

Edit a configuration in ini format:

[test.com]
user=username1
secret=GEZDGNBVGY3TQYLG
domain=https://test1.com

[huobi.com]
user=username2
secret=HEZDGNBVGY3TQYLF
domain=https://huobi.com

The secret field is a base32-encoded secret code provided by your site.

Get the authenticator code by:

$ python3 googauth.py -l test.ini

It will display the codes like:

+-----------+-------------------+--------+-----------+
| User      | Domain            | Code   | Life Time |
+-----------+-------------------+--------+-----------+
| username2 | https://huobi.com | 994604 |   27 (s)  |
+-----------+-------------------+--------+-----------+
| username1 | https://test1.com | 683903 |   27 (s)  |
+-----------+-------------------+--------+-----------+

a bash alias could be created for convenience:

$ alias googauth='python3 /path/to/googauth.py -l ~/.config/googauth.ini'

Done.

About

The Python Command-line Reimplementaion of Google Authenticator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages