scorpiox-otp 코어

외부 종속성 없이 순수 C로 구현된 TOTP(시간 기반 일회용 비밀번호) 및 HOTP(HMAC 기반 일회용 비밀번호) 생성기입니다. RFC 6238 / RFC 4226 호환 일회용 비밀번호를 명령줄에서 직접 생성합니다.

🐧 Linux x64 🐧 Linux ARM64 🍎 macOS ARM64 🪟 Windows x64

⚙️ 플래그 및 옵션

플래그 단축 설명 값 필요
--help -h 도움말 메시지 및 사용법 정보 표시 아니오
-a 해시 알고리즘 (sha1, sha256, sha512). 기본값: sha1
-j JSON 형식으로 출력 아니오
-s OTP 생성을 위한 Base32 인코딩 비밀 키

💡 사용 예시

# Generate a TOTP code with a base32 secret $ scorpiox-otp -s JBSWY3DPEHPK3PXP 492039
# Use SHA-256 algorithm instead of the default SHA-1 $ scorpiox-otp -s JBSWY3DPEHPK3PXP -a sha256 781204
# Use SHA-512 for higher security TOTP $ scorpiox-otp -s GEZDGNBVGY3TQOJQ -a sha512 350618
# Output in JSON format for scripting and automation $ scorpiox-otp -s JBSWY3DPEHPK3PXP -j {"code":"492039","algorithm":"sha1","period":30,"remaining":17}
# Combine JSON output with SHA-256 for API integration $ scorpiox-otp -s JBSWY3DPEHPK3PXP -a sha256 -j {"code":"781204","algorithm":"sha256","period":30,"remaining":12}
# Use in a shell script to auto-fill 2FA $ OTP=$(scorpiox-otp -s "$MY_SECRET") $ curl -X POST https://api.example.com/verify -d "token=$OTP"
# Pipe to clipboard (macOS) $ scorpiox-otp -s JBSWY3DPEHPK3PXP | pbcopy # Pipe to clipboard (Linux with xclip) $ scorpiox-otp -s JBSWY3DPEHPK3PXP | xclip -selection clipboard
# Show help and all available options $ scorpiox-otp --help

📦 소스 및 빌드 정보

소스 파일
scorpiox/scorpiox-otp.c
코드 줄 수
284
종속성
없음 — 외부 종속성 제로

🔗 관련 도구