OTP implementation in Bash, Python & Go

OTP Implementation in Python
install pyotp
pip install pyotp
demo python code
import pyotp
totp = pyotp.TOTP('XXXXXXXX')
print(totp.now())
OTP Implementation in Go
install go-otp
go get github.com/xlzd/gotp
demo
package main
import (
"fmt"
"github.com/xlzd/gotp"
)
func main() {
fmt.Println("Current OTP is", gotp.NewDefaultTOTP("XXXXXXXX").Now())
}
install totp-cli
go install github.com/agrinman/totp-cli@latest
totp-cli add "My Account" YOUR_SECRET
totp-cli list
totp-cli generate "My Account"
OTP Implementation in Shell
install oathtool
## Debian & Ubuntu
apt install oathtool
## CentOS & Fedora
sudo yum -y install oathtool
sudo dnf -y install oathtool
## Mac
brew install oath-toolkit
demo command
oathtool -b --totp XXXXXXXXX
Reference
https://github.com/pquerna/otphttps://github.com/xlzd/gotphttps://www.nongnu.org/oath-toolkit/https://www.ssl.com/article/what-is-a-one-time-password-otp/https://www.linkedin.com/pulse/one-time-password-shekinah-thttps://tecadmin.net/how-to-install-and-configure-totp-cli-on-ubuntu/
Some of the content is generated by AI, please be cautious in identifying it.