Skip to content

endNone/otp-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English  |  中文


otp-local

Offline TOTP / HOTP Generator.
No cloud · No internet · No tracking.

Generate one-time passwords locally from QR codes or otpauth:// URIs.
Fully compatible with Google Authenticator, FreeOTP, FreeOTP Plus.


📦 Installation

Python dependencies

pip install pillow pyzbar pexpect

System dependency (required by pyzbar)

Linux

sudo apt install libzbar0

macOS

brew install zbar

🛠 Usage

Step 1️⃣ Decode QR Code

python otp_local/qr.py
python otp_local/qr.py image.png

Supported formats:

png / jpg / jpeg / webp

Output:

otpauth.txt

Step 2️⃣ Generate OTP (Live)

python main.py

Example output:

[OTP] 123456  |  Valid for 27s

🔐 SSH Auto Login (Optional)

Environment variables:

export OTP_SSH_USER=username
export OTP_SSH_HOST=example.com
export OTP_SSH_PORT=22
python ssh_auto.py

🔒 Security Notes

  • ❌ No internet access
  • ❌ No cloud synchronization
  • ❌ No secret upload
  • ✔ All secrets stay local
  • ✔ RFC 4226 / 6238 compliant

📁 Project Structure

otp-local/
├── otp_local/
│   ├── __init__.py
│   ├── core.py
│   └── qr.py
├── main.py
├── ssh_auto.py
├── otpauth.txt
└── qr.png / qr.jpg

📜 License

MIT

About

Generate Dynamic OTPs on PC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages