scorpiox-otp أساسي

تنفيذ بلغة C الخالصة لتوليد كلمات المرور لمرة واحدة المستندة إلى الوقت (TOTP) والمستندة إلى HMAC (HOTP) بدون أي تبعيات خارجية. يولد كلمات مرور لمرة واحدة متوافقة مع RFC 6238 / RFC 4226 مباشرة من سطر الأوامر.

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

⚙️ العلامات والخيارات

العلم مختصر الوصف يأخذ قيمة
--help -h عرض رسالة المساعدة ومعلومات الاستخدام لا
-a خوارزمية التجزئة (sha1, sha256, sha512). الافتراضي: sha1 نعم
-j الإخراج بتنسيق JSON لا
-s مفتاح سري مشفر بـ Base32 لتوليد OTP نعم

💡 أمثلة الاستخدام

# 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
التبعيات
لا شيء — بدون تبعيات خارجية

🔗 أدوات ذات صلة