Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Latest commit

 

History

History
65 lines (54 loc) · 1.98 KB

readme.md

File metadata and controls

65 lines (54 loc) · 1.98 KB

OTP Generator

This script is an OTP manager, it can store secret keys and generate OTP code based on the RFC 6238 standard.

The idea is based on bash-otp, but with a different approach.

Requirements

You can use the requirements.txt file to install this dependencies:

pip3 install -r requirements.txt

Examples

  • Store a new OTP:

    ./otp.py -a github
  • Generate an OTP for a given service:

    ./otp.py -g github
  • To copy automatically the OTP to the clipboard:

    ./otp.py -g github -c

Usage

usage: otp.py [-h] [-a service_name] [-s] [-g service_name] [-d service_name]
              [-l] [-e export_file_path] [-i input_file_path] [-p] [-c]
              [--duration DURATION] [--digits DIGITS] [-x] [--delete-password]
              [--qr-code service_name]

OTP Manager

options:
  -h, --help            show this help message and exit
  -a service_name, --add service_name
                        Add a new OTP
  -s, --store           Store password
  -g service_name, --generate service_name
                        Generate OTP
  -d service_name, --delete service_name
                        Delete OTP
  -l, --list            List all OTP
  -e export_file_path, --export export_file_path
                        Export all OTP
  -i input_file_path, --import_otp input_file_path
                        Import all OTP
  -p, --print           Print all OTP
  -c, --copy            Copy OTP to clipboard
  --duration DURATION   Duration of the OTP
  --digits DIGITS       Number of digits of the OTP
  -x, --encrypted       Import/Export encrypted OTP instead of plain text
  --delete-password     Delete password from keyring
  --qr-code service_name
                        Generate QR code for OTP