Skip to content

Shell scripts for decoding / encoding QR codes

License

Notifications You must be signed in to change notification settings

mattlubner/qr-decode-encode

Repository files navigation

qr-decode-encode

GitHub Workflow Status npm

Simple shell commands for decoding / encoding QR codes.

Useful for extracting the secret from a 2FA (two factor auth) QR code, so it can be entered into your favorite password manager (such as 1Password).

Quick Start

Install

yarn global add qr-decode-encode
Alternate install methods
git clone https://github.com/mattlubner/qr-decode-encode.git
cd qr-decode-encode
yarn install
yarn link

Decode a QR Code into a string

> qr-decode-encode decode "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAACkCAYAAAAZtYVBAAAAAklEQVR4AewaftIAAAYnSURBVO3BQY4cy5LAQDLQ978yR0tfJZCoaineHzezP1jrEoe1LnJY6yKHtS5yWOsih7UucljrIoe1LnJY6yKHtS5yWOsih7UucljrIoe1LnJY6yKHtS7yw4dU/qaKSeVJxROVqWJSmSomlU9UTCpTxaQyVTxR+ZsqPnFY6yKHtS5yWOsiP3xZxTepPKn4TRWTylQxqUwVT1SeqEwVk8pU8aTim1S+6bDWRQ5rXeSw1kV++GUqb1R8QuWNikllqpgqnlQ8UXlSMalMKt+k8kbFbzqsdZHDWhc5rHWRH/7jVJ5UPFGZKiaVqeKJyidUpopJ5X/ZYa2LHNa6yGGti/zw/4zKVDGpfKJiUnmj4knFpPK/5LDWRQ5rXeSw1kV++GUVf1PF36QyVbxR8URlqpgqPlFxk8NaFzmsdZHDWhf54ctUbqIyVUwqU8Wk8k0Vk8pU8YbKVPFE5WaHtS5yWOsih7Uu8sOHKv7LKt5QeaLyRsWkMlVMKlPFk4r/ksNaFzmsdZHDWhexP/iAylTxhspUMal8omJSmSomlScVk8pUMak8qfiEym+qeKIyVXzisNZFDmtd5LDWRX74ZSpTxVQxqUwVk8qTim+qeFLxpGJSmVSmiicqU8UbKlPFE5W/6bDWRQ5rXeSw1kXsD36RyhsVk8pU8UTlExVPVKaKSWWqeKJys4pJ5UnFJw5rXeSw1kUOa13E/uA/RGWqeENl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/+4ikllqvhNKk8qJpWpYlJ5UvGJiknlicobFZ84rHWRw1oXOax1kR/+x1S8ofJGxZOKSeWNiicqU8UTlU9U/E2HtS5yWOsih7Uu8sMvq/iXVKaKN1SeVDypmFQmlaliUnlD5YnKE5Wp4m86rHWRw1oXOax1kR++TOVvUpkqpoo3VKaKSWWqeKNiUvlNFW+oTCpTxaQyVXzisNZFDmtd5LDWRewP1rrEYa2LHNa6yGGtixzWushhrYsc1rrIYa2LHNa6yGGtixzWushhrYsc1rrIYa2LHNa6yGGti/wfkzYfMj3htrwAAAAASUVORK5CYII="
i am a qr code

Encode a string as a QR Code

> qr-decode-encode encode "i am a qr code"
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAACkCAYAAAAZtYVBAAAAAklEQVR4AewaftIAAAYnSURBVO3BQY4cy5LAQDLQ978yR0tfJZCoaineHzezP1jrEoe1LnJY6yKHtS5yWOsih7UucljrIoe1LnJY6yKHtS5yWOsih7UucljrIoe1LnJY6yKHtS7yw4dU/qaKSeVJxROVqWJSmSomlU9UTCpTxaQyVTxR+ZsqPnFY6yKHtS5yWOsiP3xZxTepPKn4TRWTylQxqUwVT1SeqEwVk8pU8aTim1S+6bDWRQ5rXeSw1kV++GUqb1R8QuWNikllqpgqnlQ8UXlSMalMKt+k8kbFbzqsdZHDWhc5rHWRH/7jVJ5UPFGZKiaVqeKJyidUpopJ5X/ZYa2LHNa6yGGti/zw/4zKVDGpfKJiUnmj4knFpPK/5LDWRQ5rXeSw1kV++GUVf1PF36QyVbxR8URlqpgqPlFxk8NaFzmsdZHDWhf54ctUbqIyVUwqU8Wk8k0Vk8pU8YbKVPFE5WaHtS5yWOsih7Uu8sOHKv7LKt5QeaLyRsWkMlVMKlPFk4r/ksNaFzmsdZHDWhexP/iAylTxhspUMal8omJSmSomlScVk8pUMak8qfiEym+qeKIyVXzisNZFDmtd5LDWRX74ZSpTxVQxqUwVk8qTim+qeFLxpGJSmVSmiicqU8UbKlPFE5W/6bDWRQ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lScVT1Smik8c1rrIYa2LHNa6yA+/TOWNijdUpoqpYlKZKn6TyqTypOITKp+oeKPimw5rXeSw1kUOa13kh/+4ikllqvhNKk8qJpWpYlJ5UvGJiknlicobFZ84rHWRw1oXOax1kR/+x1S8ofJGxZOKSeWNiicqU8UTlU9U/E2HtS5yWOsih7Uu8sMvq/iXVKaKN1SeVDypmFQmlaliUnlD5YnKE5Wp4m86rHWRw1oXOax1kR++TOVvUpkqpoo3VKaKSWWqeKNiUvlNFW+oTCpTxaQyVXzisNZFDmtd5LDWRewP1rrEYa2LHNa6yGGtixzWushhrYsc1rrIYa2LHNa6yGGtixzWushhrYsc1rrIYa2LHNa6yGGti/wfkzYfMj3htrwAAAAASUVORK5CYII=

About

Shell scripts for decoding / encoding QR codes

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published