Skip to content

Create TOTP secrets, encode in Google Authenticator compatible QR Code and send via S/MIME encrypted e-mail.

Notifications You must be signed in to change notification settings

frennkie/totp_builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOTP Builder (totp_builder.py)

Overview

Create TOTP secrets, encode in Google Authenticator compatible QR Code and send via S/MIME encrypted e-mail.

Requirements

  • python2

  • python-m2crypto

  • pyotp

  • qrcode

  • shred (securely delete files) or

  • srm

Install on Ubuntu

sudo apt-get update
sudo apt-get install -y python2.7 python-pip python-m2crypto python-qrcode python-ldap shred
sudo -H pip2 install pyotp

Install on CentOS 7

sudo yum install -y python2 python-pip m2crypto python-qrcode srm
sudo -H pip2 install pyotp

Usage / Config

Currently no command line options or help are available. Just run the python script:

$: ./totp_builder.py --certificate jdoe_example_com_public.pem --no-ldap --send [email protected]
Processing eMail address: example.com

* example.com (example.com): F4UU3QROWF2LHYYK
SQL Statement (if user id is cn)

or

$: ./totp_builder.py [email protected]
Processing eMail address: [email protected]

Warning: More than one result.. using first!
* Doe John ([email protected]): VYQXC7WJ53JK4K2F

Just copy line and add more users.

The certificate is expected to be in "PEM" format

 head jdoe_example.com_smime_public.pem
-----BEGIN TRUSTED CERTIFICATE-----
MIIFPzCCAycCAQEwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV
BAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
ZDAeFw0xNzAyMTkxMDEzNTZaFw0xODAyMTkxMDEzNTZaMIGFMQswCQYDVQQGEwJB
[...]

Screenshot

Thunderbird

About

Create TOTP secrets, encode in Google Authenticator compatible QR Code and send via S/MIME encrypted e-mail.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages