Skip to content

xhsdf/p2fa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

P2FA

TOTP-based two-factor authentication in python

p2fa.py

Generates 2FA codes

--add

Add a new account from user input

--file /path/to/accounts.json

Path to JSON file used to store account data (default: accounts.json)

--password hunter2

Password used to encrypt secrets
Will prompt for password when not set

--export

Print all accounts as otpauth URLs

--export-qr

Export accounts as QR code images into same folder as JSON file (requires qrcode)

--no-mask

Keep account names unmasked when adding

--show-secret

Display secret values in plain text when displaying codes

imp2fa.py (optional)

Import accounts from QR code data

--import

Import account data from otpauth or otpauth migration URLs
Can handle multiple otpauth URLs delimited by ';'

--file /path/to/accounts.json

Path to JSON file used to store account data (default: accounts.json)

--password hunter2

Password used to encrypt secrets
Will prompt for password when not set

--no-mask

Keep account names unmasked when adding

Examples

Display 2FA codes:

p2fa.py --file ~/config/p2fa/accounts.json

Add a new account:

p2fa.py --add --file ~/config/p2fa/accounts.json

Import account from an otpauth URL:

imp2fa.py --import "otpauth://totp/AWesker?secret=ABCDEF&issuer=UmbrellaCorp" --file ~/config/p2fa/accounts.json

About

TOTP-based two-factor authentication in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages