Skip to content

Repository files navigation

Overview

This is a simple project to create an "agent" for Google Authenticator.
We export the raw TOTP key from Google Authenticator and then generate the code using a simple Python script.

[!CAUTION] Keep your key secret
Please ensure that your exported key is kept safe from unauthorized access.
If someone gains access to your key, they can generate TOTP codes just like your Google Authenticator does.
This could cause TOTP or two-factor authentication (2FA) to malfunction and lead to security issues for your account.

Usage & Quick Start

Dependencies & Requirements

  1. Google Authenticator App and pre-registered codes
  2. UV, a modern manager for Python interpreters and packages, installed
  3. Dependency packages like libzbar0 and protobuf-compiler, which are required during raw key transformation. You can install them via apt.

Setup & Run

git clone https://github.com/haward79/tfa_agent.git
cd tfa_agent

# Export your key and metadata from Google Authenticator
# Place the generated image in the project root and name it google_auth.jpg

protoc --python_out=. migration.proto
uv run python decode_parse.py

# In project root, a file named google_auth.bin should be generated
# This file contains your key and cleaned metadata
# You can safely delete the original image file and just use google_auth.bin

uv run python totp.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages