8 个版本
使用旧 Rust 2015
| 0.4.5 | 2024年2月26日 | 
|---|---|
| 0.4.4 | 2023年12月6日 | 
| 0.4.1 | 2023年2月25日 | 
| 0.3.2 | 2022年10月23日 | 
| 0.2.3 | 2018年6月15日 | 
#877 in 命令行工具
1.5MB
540 行
包含 (ELF 可执行文件/库, 2.5MB) artifacts/ubuntu-latest/totp, (Mach-o 可执行文件, 1MB) artifacts/macos-latest/totp, (DOS 可执行文件, 775KB) artifacts/windows-latest/totp.exe
🐴 RusTOTPony
基于时间的单次密码生成器的 CLI 管理器。它是 Google Authenticator 的桌面替代品。
安装
Arch Linux
在 AUR 中有软件包
其他
从 最新版本 中获取适当的二进制文件,并将其放置在您选择的位置。如果您在 *nix 系统上,别忘了设置正确的权限:chmod +x totp。
手动构建
从 crates.io
确保您有 $HOME/.cargo/bin 在您的 $PATH。
cargo install rustotpony
从源码
- 克隆此存储库
- 从存储库目录中运行 cargo install
- 保持冷静,等待编译
您可能需要 gcc (Linux) 或 clang (Mac OS) 来编译依赖项。
使用方法
$ totp help
🐴 RusTOTPony 0.3.2
Manager of one-time password generators
Usage: totp [COMMAND]
Commands:
  dash       Show realtime dashboard with all generators
  list       List all generators
  add        Add a new generator
  delete     Delete a generator
  rename     Rename a generator
  eradicate  Delete all generators
  help       Print this message or the help of the given subcommand(s)
Options:
  -h, --help     Print help information
  -V, --version  Print version information
明智地选择您的密码
第一次运行时,totp 会要求您为新数据库输入一个密码。它位于 $HOME/.rustotpony/db.json (不要被 json 扩展名迷惑,实际上它是一个二进制文件)。如果您忘记密码或想更改密码,您必须删除 $HOME/.rustotpony 目录。这并不方便,但我将改进可用性并添加更改密码的命令。
基本场景
- 
从您的TOTP提供者获取一个密钥(它必须使用base32编码,例如, GEZDGMZSGE2TKCQ=)$ # Creating a fake secret key for demo purposes $ echo 123321555 | base32 GEZDGMZSGE2TKNIK
- 
使用 totp add <NAME>添加新的生成器(您将被要求输入密钥和密码)$ # Adding a new TOTP generator $ totp add demo Enter your secret code: Enter your database pass: New application created: demo如果不是第一次运行,您将被要求两次输入密码:一次用于打开数据库,一次用于保存。 
- 
使用 totp list来检查您的密钥$ # Listing all secrets in the database $ totp list Enter your database pass: +------+------------------+----------+ | name | key | username | +------+------------------+----------+ | demo | GEZDGMZSGE2TKNIK | | +------+------------------+----------+
- 
使用 totp dash或只需totp即可实时查看仪表板$ # Display real-time dashboard with all generators $ totp Enter your database pass: Welcome to RusTOTPony realtime dashboard! Press ^C to quit. [============================================= ] 009216 demo
- 
按下^C后,它将清理仪表板 $ totp Enter your database pass: I won't tell anyone about this 🤫
待办事项
- 命令补全
- 数据库密码缓存
- 测试
- 重构show和show-all命令
许可证
根据MIT许可证授权。
依赖关系
~7–19MB
~202K SLoC