Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
desktop-2fa β€” A secure offline desktop application for generating and managing TOTP 2FA codes. Features encrypted vault storage, modern cryptography (Argon2 + AES‑GCM), modular architecture, and a local‑first approach with no cloud dependencies. Designed for reliability, extensibility, and future cross‑platform UI. | Kitploit
Tools/GitHubGitHub/wrogistefan/desktop-2fa
General Purpose UtilitiesEncryption/Decryption ToolsCryptographyPrivacyAuthentication
GitHubwrogistefan/desktop-2fa

desktop-2fa

View Repository
301168 months agoReviewed by Kitploit
Website

Most Popular

View all β†’

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools β†’

About

A secure offline desktop application for generating and managing TOTP 2FA codes. Features encrypted vault storage, modern cryptography (Argon2 + AES‑GCM), modular architecture, and a local‑first approach with no cloud dependencies. Designed for reliability, extensibility, and future cross‑platform UI.

Share

πŸ›‘οΈ Desktop-2FA

A secure, offline two-factor authentication (2FA) manager for desktop environments. Built with Python, featuring strong encryption and no cloud dependencies.

🌐 Landing Page: desktop-2fa.org

PyPI - Downloads PyPI version Python versions License Build codecov


✨ Features

FeatureDescription
πŸ” Vault SecurityAES-256-GCM encryption with Argon2id key derivation
⏱️ TOTP GenerationRFC 6238 compliant code generation
πŸ’» Full CLIComplete command-line interface for managing tokens
πŸ“‹ Clipboard SupportAutomatic copying of TOTP codes to clipboard
πŸ”“ Stateless DesignEvery command requires explicit password authentication
πŸ›‘οΈ Password PolicyConfigurable password strength enforcement with zxcvbn
πŸ§ͺ Well Tested289 tests passing with comprehensive coverage
πŸ“– Security ModelDetailed threat analysis and cryptographic design documentation

πŸ“Έ Screenshots

Add entry interactively Adding a new TOTP entry interactively

Code generation Generating a TOTP code for an entry

Rename and duplicate error Renaming an entry with duplicate detection

Version and list Viewing version info and listing all entries


πŸš€ Quick Start

Installation

pip install desktop-2fa

Verify installation:

python -c "import desktop_2fa; print(desktop_2fa.__version__)"
# Output: 0.8.1dev

Basic Usage

# Initialize a new vault
d2fa vault init

# Add a new TOTP token
d2fa vault add GitHub GitHub JBSWY3DPEHPK3PXP

# List all entries
d2fa vault list

# Generate a code
d2fa code GitHub

Non-Interactive Usage

# Provide password via command line
d2fa vault add GitHub GitHub JBSWY3DPEHPK3PXP --password mypassphrase

# Provide password via file
d2fa vault add GitHub GitHub JBSWY3DPEHPK3PXP --password-file /path/to/passphrase.txt

πŸ“ Vault Lifecycle

The vault is an encrypted storage file located at ~/.desktop-2fa/vault.

Vault Creation

When a command requires a vault and none exists:

  1. The CLI prompts for a new password (interactive mode) or requires --password/--password-file (non-interactive mode)
  2. An empty encrypted vault is created
  3. A confirmation message is always printed: Vault created at <path>

Vault Loading

When a command requires a vault and it exists:

  1. The CLI prompts for the existing password (interactive mode) or requires credentials (non-interactive mode)
  2. The vault is decrypted and loaded
  3. If the password is invalid, the CLI exits with typer.Exit(1)

Duplicate Entry Handling

The rename command enforces deterministic behavior when multiple entries match the target name:

  • If multiple entries match the provided name (issuer or account_name), the rename is aborted
  • Error message: Error: Multiple entries named '<name>' exist. Operation aborted. Resolve duplicates first.
  • No entry is renamed in this case
  • This check occurs before any mutation

πŸ“– CLI Commands

Core Commands

CommandDescription
d2fa vault add <name> <issuer> <secret>Add a new TOTP entry
d2fa vault listList all stored TOTP entries
d2fa vault rename <old> <new>Rename an entry
d2fa vault remove <name>Remove an entry
d2fa code <name> [--copy|--copy-only]Generate TOTP code with clipboard copy options

Vault Management

CommandDescription
d2fa vault init [--force]Initialize a new vault
d2fa vault unlockOpen vault with weak password warning (if configured)
d2fa vault change-passwordChange the vault password
d2fa vault backupCreate an encrypted backup of the vault
d2fa vault export <path>Export vault to file
d2fa vault import <path> [--force]Import vault from file

Global Options

OptionDescription
--password <pwd>Provide vault password directly
--password-file <path>Read vault password from file
--jsonOutput in JSON format
--rawRaw output (no formatting)
--quietSuppress non-essential output
--copyCopy TOTP code to clipboard and display
--copy-onlyCopy TOTP code to clipboard only
--forceForce operation (bypass confirmations)

πŸ”’ Security

The vault uses:

  • AES-256-GCM for authenticated encryption
  • Argon2id for key derivation (time_cost=4, memory_cost=128MiB, parallelism=2)
  • zxcvbn for password strength evaluation
  • Versioned header for forward compatibility

Every command requires explicit password authentication. No session-based access.

Password Strength Evaluation

Desktop-2FA uses zxcvbn to evaluate password strength when creating or changing vault passwords:

  • Score 0-2 (Weak): Easily guessable passwords (e.g., "password123")
  • Score 3-4 (Strong): Resistant to common attacks (recommended)

Examples:

  • ❌ Weak: password, 123456, qwerty, admin2024
  • βœ… Strong: Battery-Horse-Staple-Correct, Mountain@River*2024, MySecureVault#42

Configuration (~/.config/d2fa/config.toml):

[security]
# Require strong passwords (score >= 3)
reject_weak_passwords = false  # warn but allow | true: reject weak passwords

When reject_weak_passwords = false:

  • Weak passwords trigger a yellow warning
  • User is prompted to confirm continuation
  • Password acceptance is non-blocking

When reject_weak_passwords = true:

  • Weak passwords are rejected immediately
  • Command exits with error
  • User must choose a stronger password

Backward Compatibility: If you have min_password_entropy set in your config (legacy option), it is recognized and treated as equivalent to requiring zxcvbn score >= 3.

Security Hardening (v0.8.0)

Version 0.8.0 maintains all previous security hardening from v0.7.3 and introduces modular architecture for better code isolation:

  • Empty passwords are immediately rejected with a clear error message
  • Permission errors are distinguished from missing vault files
  • No Python stack traces are shown to users
  • User-friendly error messages for filesystem permission issues
  • Modular design separates CLI and core cryptographic components for enhanced security boundaries
  • zxcvbn-based password strength evaluation (new in v0.8.0)

πŸ“š Documentation

Download Tool