A small script to activate Duo's HOTP code
-
Register a new device
- Select Tablet
- Select Android
- Select "I have Duo Mobile installed"
-
Right click the QR code, copy the image url, and then run this program with the QR code url.
# example python main.py "https://api-xxxxxxxx.duosecurity.com/frame/qr?value=....-...."
-
You'll get your HOTP secret with a counter, which starts from 0.
- You can use a cli tool like
oathtool
to generate the passcode.# example oathtool --hotp -b 'base32' -c 0
- You cannot use some managers like 1Password since they do not support HOTP.
- Ensure that the counter is incremented every time you login.
- Other details: SHA1, 6 digits