GithubHelp home page GithubHelp logo

wesleywh / qr_decoder Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

Display Google Authenticator QR codes to your camera and it will spit out all the info you need to move it to any other location.

License: MIT License

Python 100.00%

qr_decoder's Introduction

What Is This?

This is a copy of a series of githubs and blog posts combined into a single convienant package for getting your qr code values from your authenticator app. I made this so I could easily transfer already made time base codes from one authenticator app into any other without having to turn off 2fa and turn it back on for the purpose of just having it in more than one place.

Important Note: I made this to personally work with Google Authenticator and BitWarden, so I haven't tried any of the others.

Installation Steps

  1. brew install zbar
    • if M1 mac:
      a. mkdir ~/lib
      b. ln -s $(brew --prefix zbar)/lib/libzbar.dylib ~/lib/libzbar.dylib
    • if windows, this comes pre-installed can skip
    • if linux apt-get install zbar
  2. pip install -r requirements.txt -t "full/path/to/this/dir"

How To Run

python decode_qr.py

Then open google authenticator (or some other TOTP app) and generate the QR code (normally via export menu). Show the QR code to your camera and it will spit out all the content you need from the QR code to your console. It will also save the content to a barcodes.csv file for you.

Generate QR Code Images

If you want to generate the QR code image to scan into another app on your phone (without another phone) then run the following command:

python decode_qr.py --generate qr_code

This will do all the same things as above but will also generate a qr_code.png file that is the url content of the qr code.

Change Saved FileName

python decode_qr.py --output my-new-file.csv

This will change the qr code content getting saved from barcodes.csv to my-new-file.csv.

Additional Notes

The start_webcam.py file, like the name suggests, will only start your webcam. Does nothing by itself. I only kept this for learning how to do this yourself.

Made Possible By

This is simply extractions and slight modifications from the following places:
https://github.com/scito/extract_otp_secret_keys
https://note.nkmk.me/en/python-pillow-qrcode/
https://pyimagesearch.com/2018/05/21/an-opencv-barcode-and-qr-code-scanner-with-zbar/
https://github.com/meticulousCraftman/QR-Code

qr_decoder's People

Contributors

wesleywh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.