GithubHelp home page GithubHelp logo

fudong1127 / gauth_code Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtrsan/gauth_code

0.0 1.0 0.0 140 KB

gauth_code is a simple script that generates verification codes for Google 2-Step verification.

License: MIT License

gauth_code's Introduction

About

gauth_code is a simple script that generates verification codes for Google 2-Step verification. gauth_code has support for storing configuration for multiple accounts. Configuration saves at ~/.gauthrc.

Installation

Just copy gauth_code somewhere on your path.

Usage

Generate verification code

To generate a verification code account run gauth_code without parameters. Before that the account must be configured. See "Add / update an account" how to configure the account.

Example:

$ gauth_code [email protected]

Account: [email protected]
-----------------------------
***....... 291337
.......... 133775
-----------------------------

Add / update an account

To add an account run gauth_code with -s parameter.

Example:

$ gauth_code -s 3a2xv44tgvxqajn4rvw7hceuwi6rl337 [email protected]

Adding account '[email protected]' with the new secret.

Account: [email protected]
-----------------------------
***....... 291337
.......... 133775
-----------------------------

Remove an account

To remove an account run gauth_code with -r parameter.

Example:

$ gauth_code -r [email protected]

Trying to remove account '[email protected]'.
Account '[email protected]' is removed.

List all configured accounts

To list all configured accounts run gauth_code with -l parameter.

Example:

$ gauth_code -l

Available accounts:
  [email protected]
  [email protected]

Help

To see help run gauth_code with -h parameter.

Example:

$ gauth_code -h

Usage: gauth_code [-h] [-l] [-r | -s <secret>] <account>

Description:
  -l    List the accounts.
  -r    Remove an account.
  -s <secret>
        Add a new account or update secret for an existing account.
        Secret is a base32 encoded string.
  -h    Help.

Requirement

gauth_code requires Python 3. It uses only Python Standard Library. No additional installation of third party modules is required.

FAQ

  1. Is it possible to use gauth_code to generate a code for Dropbox two-step verification? gauth_code always throws "Invalid secret." message during account configuration.

Answer: Yes, it is but you need to pad the secret key properly. Just add six '=' characters ("======") at the end of the secret key and everything will work fine.

gauth_code's People

Contributors

dtrsan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.