Skip to content

Wujidadi/TOTP-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOTP Generator

This is a simple Node.js script to generate Time-based One-Time Passwords (TOTP) based on a shared secret. It supports customizable time steps and OTP digit lengths.

Usage

./gentotp --secret <SECRET> [--time-step <STEP>] [--digits <DIGITS>]
# or
./gentotp -s <SECRET> [-t <STEP>] [-d <DIGITS>]
  • --secret, -s: The TOTP secret (required).
  • --time-step, -t: The time step in seconds (default is 30 seconds).
  • --digits, -d: The number of digits in the OTP (default is 6 digits).

Examples

$ ./gentotp --secret JBSWY3DPEHPK3PXP
$ ./gentotp -s JBSWY3DPEHPK3PXP -t 30 -d 6
492039

Additional Information

To extract the secret from a QR code image, you can use online tools such as:

About

A simple tool to generate Time-based One-Time Passwords (TOTP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors