2FA Solver

Retrieve real-time OTP and generate/scan QR codes through a web-page

Yuthan Balaji K
4 min readDec 30, 2021

Problem Statement:

Sometimes while testing an application with multifactor authentication, I have felt that it will be convenient for us to have an OTP receiving offline tool like a web-page. It will also be convenient to copy-paste the code into the application multiple times. Thus, the tool won’t have any internet dependencies or mobile dependency or no need for desktop application that needs installation.

Solution:

After a little research, I came across a few online tools and with their inspirations, I have created the tool 2FA-Solver to achieve the solution. Along with the OTP retrieval, I have managed to implement the QR code generator and scanner so that it will be easier to complete the process.

Overview

2FA Solver is a JavaScript & HTML based web-page that helps to generate/scan QR codes and retrieve OTP in real-time using the secret key.

It can be used offline without any internet connection by downloading the 2FA-Solver.html file along with the configs folder from the 2FA Solver GitHub repo and accessing it from the local machine. It can also be hosted on an online environment, as shown in the 2FA Solver site. However, generating/scanning QR codes and retrieving real-time OTP does not require an internet connection.

Retrieve One-Time Password in Real-Time: Provides real-time OTP for a given secret key like google authenticator.
QR Code (Image) Generator/Encoder: Encodes any content or the URL into a QR code image.
QR Code (Image) Scanner/Decoder: Scans and extracts the content from a QR code image.

How to use the tool?

2FA Solver Web interface will consist of three main modules:

  • QR Code (Image) Generator/Encoder — Encodes any content or the URL into a QR code image.
  • QR Code (Image) Scanner/Decoder — Scans and extracts the content from a QR code image.
  • Retrieve One-Time Password in Real-Time — Provides real-time OTP for a given secret key like google authenticator.

QR Code (Image) Generator/Encoder

Provide the URL/content to encode as QR code in the text box (as highlighted below in red colour in the below screenshot).

Select the appropriate settings required for your QR code image (as highlighted below in red colour in the below screenshot) and hit the Generate button.

The application will generate the QR code image which can be saved or copied by right-clicking from PC/MAC/Laptops or by long press on the image from phones.

QR Code (Image) Scanner/Decoder

Click the Choose File button (as highlighted below in red colour in the below screenshot) to select the QR code image you want to scan/decode.

Hit the Decode button (as highlighted below in red colour in the below screenshot) to extract the content.

You can copy the extracted secret key (as highlighted below in red colour in the below screenshot) for retrieving real-time OTP in the Retrieve One-Time Password in Real-Time tab.

Retrieve One-Time Password in Real-Time

Paste the secret key obtained from the QR Code (Image) Scanner/Decoder tab (or the secret key you already have in hand) into the Secret (base32) text box (as highlighted below in red colour in the below screenshot).

The application will start displaying the OTP that belongs to the key in real-time, as shown below.

2FA Solver is a handy tool for people testing applications have a need of inputting OTP frequently or generate/scan QR codes. If you like the tool, do give a claps/thumbs up/heart, it’s absolutely free! ;)

Yuthan Balaji K is a Cybersecurity Professional & Pentester. He has led several event management, delivered public speaking, and managed large teams as part of professional acting before switching his career into cybersecurity.

--

--

Yuthan Balaji K
Yuthan Balaji K

Written by Yuthan Balaji K

Cyber Security Professional | Pentester | Automations & Innovations key player

No responses yet