|
| 1 | ++++ |
| 2 | +date = '2025-04-12T17:24:03+02:00' |
| 3 | +title = 'Barcode Scanner Password Manager' |
| 4 | +summary = 'Typing long passwords by hand? Hell no!' |
| 5 | ++++ |
| 6 | + |
| 7 | +There's a Windows PC at work that, for some reason, requires its bitlocker recovery key after every |
| 8 | +reboot. It doesn't reboot that often, but entering a 48 digit long key by hand gets really old fast. |
| 9 | +Especially after you enter in the third time, because of course you mistyped something in the first |
| 10 | +two tries. |
| 11 | + |
| 12 | +I work in the Production Test team at Zivid, and we're the team that is responsible for all the |
| 13 | +tests and infrastructure that is required for production of our cameras. In the production line, |
| 14 | +there are many instances where a barcode scanner is used for tracking of various things. |
| 15 | + |
| 16 | +So natuarlly, someone in my team came up with the brilliant idea of making the bitlocker key into a |
| 17 | +QR code, and then simply scan it with a barcode scanner. No typing required and zero errors! |
| 18 | + |
| 19 | +{{< alert >}} |
| 20 | +**Note!** If you decide to replicate this, do *not* use a web service to generate your QR code. |
| 21 | +They are most likely logging everything! Instead, follow the [guide](#generate-a-qr-password-safely) |
| 22 | +below. |
| 23 | +{{< /alert >}} |
| 24 | + |
| 25 | +After this, we started joking that we should print all the password that we have on 1password, and |
| 26 | +instead walk around with a book of QR codes and a barcode scanner. |
| 27 | + |
| 28 | +I hope it goes without saying that this is *not* recommended. |
| 29 | + |
| 30 | +## Generate a QR password safely |
| 31 | + |
| 32 | +Like I mentioned above, if you decide to replicate this, you should *never* use an online service |
| 33 | +to generate your QR code! |
| 34 | + |
| 35 | +Instead, you can generate a QR code locally using the [`qrcode`](https://pypi.org/project/qrcode/) |
| 36 | +python library. It will install a script entrypoint allowing you to simply call: |
| 37 | + |
| 38 | +```bash |
| 39 | +qr "hello" |
| 40 | +``` |
| 41 | + |
| 42 | +And it will print out a QR directly in your terminal using unicode |
| 43 | +[Block Elements](https://en.wikipedia.org/wiki/Block_Elements). |
| 44 | + |
| 45 | +<pre style="font-family: monospace; line-height: 1.15;"> |
| 46 | +█████████████████████████████ |
| 47 | +█████████████████████████████ |
| 48 | +████ ▄▄▄▄▄ █▀ ▄███ ▄▄▄▄▄ ████ |
| 49 | +████ █ █ ██▄▀ ▄█ █ █ ████ |
| 50 | +████ █▄▄▄█ █▄▄██ █ █▄▄▄█ ████ |
| 51 | +████▄▄▄▄▄▄▄█▄█ ▀ █▄▄▄▄▄▄▄████ |
| 52 | +████▄█ █ ▀▄██▄▀▄██▀█▄██ ▀████ |
| 53 | +████▀ █▄▀█▄█▄▄▄█▄█▀█▄▄▄ ▄████ |
| 54 | +█████▄▄█▄█▄▄▀▀ ▀▄▀▄▀▄█▀▀▀████ |
| 55 | +████ ▄▄▄▄▄ ███ ▀ ▄ ▀█▄▄▄████ |
| 56 | +████ █ █ █▄▀▄▄█▄ ██▀ ▄████ |
| 57 | +████ █▄▄▄█ █▄ ▄█▄█▀█ █▄▀▄████ |
| 58 | +████▄▄▄▄▄▄▄█▄▄▄█▄█▄▄███▄▄████ |
| 59 | +█████████████████████████████ |
| 60 | +▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ |
| 61 | +</pre> |
0 commit comments