From 95fe6e59d68e3594938565e8cd8c4c72980d9233 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 29 May 2019 17:56:34 +0200 Subject: [PATCH 1/2] update zbar link to the maintained fork The original upstream at http://zbar.sourceforge.net/ has not produced a new release or a new commit on their repository in about 7 years, most distros (Debian, Gentoo, Arch, ...) have switched to this fork. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d18e81e..b889ecd 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Pipe an `otpauth://` URI into a passfile: $ pass otp insert totp-secret < totp-secret.txt ``` -Use [zbar](http://zbar.sourceforge.net/) to decode a QR image into a passfile: +Use [zbar](https://github.com/mchehab/zbar) to decode a QR image into a passfile: ``` $ zbarimg -q --raw qrcode.png | pass otp insert totp-secret From ac3761ac0e85ca993edcff60391f1fe95026249d Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 29 May 2019 18:01:06 +0200 Subject: [PATCH 2/2] add README example to import on-screen qr code --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b889ecd..7456f03 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,13 @@ The same, but appending to an existing passfile: $ zbarimg -q --raw google-qrcode.png | pass otp append google/example@gmail.com ``` +By throwing [maim](https://github.com/naelstrof/maim) to the mix you can even +create a passfile directly from a QR code displayed on screen, by selecting it: + +``` +$ maim -sk | zbarimg -q --raw - | pass otp insert totp-secret +``` + Generate a 2FA code using this token: ```