• Stars
    star
    661
  • Rank 67,978 (Top 2 %)
  • Language
    Go
  • License
    ISC License
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Google Authenticator migration decoder

Google Authenticator migration decoder

Logo

Convert Google Authenticator otpauth-migration://offline?data=... transfer links to plain otpauth links.

Usage

  • Navigate to โ‹ฎ โ†’ Transfer accounts โ†’ Export accounts.
  • Extract migration link from QR-code using your preferred software.
  • Pass link to otpauth tool.

Flags

  -workdir string
    	working directory to store eventual files (defaults to current one)
  -eval
    	evaluate otps
  -http string
    	serve http (e.g. :6060)
  -info
    	display batch info
  -link string
    	migration link (required)
  -qr
    	generate QR-codes (optauth://)
  -rev
    	reverse QR-code (otpauth-migration://)

Example

NOTE: at least Go 1.16 required, or use latest binary release.

go get github.com/dim13/otpauth

Starting in Go 1.17, installing executables with go get is deprecated. go install may be used instead:

go install github.com/dim13/otpauth@latest

Usage

~/go/bin/otpauth -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"

Will output:

otpauth://totp/Example:[email protected]?issuer=Example&secret=JBSWY3DPEHPK3PXP

QR-Codes

~/go/bin/otpauth -qr -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"
# view and scan *.png in current working directory

Will generate:

Example

Serve http

~/go/bin/otpauth -http=localhost:6060 -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"

Navigate to http://localhost:6060/

Docker

A Docker container can also be used to run the application by building and running the image as following

Build image

From the current directory run

docker build . -t otpauth:latest

Run container

To start a container from the previously created image run

docker run --name otpauth -p 6060:6060 -v $(pwd)/workdir:/app/workdir --rm otpauth:latest -workdir /app/workdir -http :6060 -link "otpauth-migration://offline?data=CjEKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZTAC"
-p 6060:6060
Map the host 6060 to the containr 6060

-v $(pwd)/workdir:/app/workdir
Map the host dir to the containr dir

Navigate to http://localhost:6060/

More Repositories

1

unifi

Ubiquiti Unifi Go API
Go
65
star
2

gone

Where has my time gone?
Go
50
star
3

file2go

Dead-simple file embedding tool for Go
Go
40
star
4

gotex

LaTeX to PDF print ยตService in Go
Go
14
star
5

spectrogram

OpenBSD sndio Spectrogram
C
14
star
6

fire

Experiments with ebiten - Doomfire
Go
10
star
7

cobs

Consistent Overhead Byte Stuffing
Go
10
star
8

smyck.vim

Smyck color scheme for vim
Vim Script
10
star
9

hashcolor

Simple color randomizer for uxterm
Go
8
star
10

j1

J1 Forth CPU emulator in Go
Go
8
star
11

seahash

SeaHash algorithm
Go
6
star
12

sun

Sunrise/Sunset Algorithm
Go
5
star
13

lor

Conversion of LOR wiki to GH wiki, experimental
Go
4
star
14

ilda

ILDA Image Data Transfer Format
Go
4
star
15

djb2

Bernstein djb2 hash algorithm
Go
4
star
16

pvtrace

Visualize function calls with Graphviz
C
4
star
17

dimos

DimOS RT/OS for Atmega328
C
4
star
18

xedit.vim

XEdit like color theme for VIM
Vim Script
3
star
19

gocode.vim

Minimal color scheme mimicking Go webpage
Vim Script
3
star
20

prettyjson

Prettify JSON
Go
3
star
21

crc24

OpenPGP RFC4880 CRC24 algorithm
Go
3
star
22

tekpot

Tektronix Utah Teapot
C
3
star
23

sct

Set Color Temperature
Go
3
star
24

captcha

reCAPTCHA 1.0 Go API
Go
2
star
25

bit

variable-length bit-fields
Go
2
star
26

spigot

Daisy-chan spigot algorithm for Pi and E
Go
2
star
27

dcpu16

DCPU-16 Assembler/Emulator
C
2
star
28

2fa

2fa totp cli
Go
2
star
29

gallant

Gallant 12x22 typeface
Go
2
star
30

codvn

SAP CODVN H password hashing algorithm (PWDSALTEDHASH)
Go
1
star
31

gofont

1
star
32

pearson

8-bit hash RFC 3074
Go
1
star
33

watch

Execute program periodically, showing output fullscreen
C
1
star
34

shuffle

Fisher-Yates shuffle algorithm
Go
1
star
35

mandelbrot

Go
1
star
36

xxhash

Fast non-cryptographic hash algorithm
Go
1
star
37

tekilda

Tektronix ILDA
C
1
star
38

tekclock

Tektronix Clock
C
1
star
39

letal

Less TOR at LOR
Go
1
star
40

loadavg

get system load averages
Go
1
star
41

isc

Go
1
star
42

blinkstick

Go interface to blinkstick
Go
1
star
43

golyb

Go love your brain - yet another optimizing BrainF*ck interpreter in Go
Go
1
star
44

.github

dim13 defaults
1
star