mirror of
https://github.com/scito/extract_otp_secrets.git
synced 2025-12-19 00:32:26 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3502294172 | ||
|
|
2707e244be | ||
|
|
4ba0fad000 | ||
|
|
9d052dc78a | ||
|
|
915efcf192 |
1
.github/workflows/ci_docker.yml
vendored
1
.github/workflows/ci_docker.yml
vendored
@@ -9,7 +9,6 @@ name: docker
|
|||||||
on:
|
on:
|
||||||
# run it on push to the default repository branch
|
# run it on push to the default repository branch
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
|
||||||
schedule:
|
schedule:
|
||||||
# Run weekly on default branch
|
# Run weekly on default branch
|
||||||
- cron: '47 3 * * 6'
|
- cron: '47 3 * * 6'
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -1,4 +1,4 @@
|
|||||||
# Extract secrets from QR codes exported by two-factor authentication apps
|
# Extract TOTP/HOTP secrets from QR codes exported by two-factor authentication apps
|
||||||
|
|
||||||
[](https://github.com/scito/extract_otp_secrets/actions/workflows/ci.yml)
|
[](https://github.com/scito/extract_otp_secrets/actions/workflows/ci.yml)
|
||||||

|

|
||||||
@@ -13,15 +13,15 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
The Python script `extract_otp_secrets.py` extracts one time password (OTP) secrets from QR codes exported by two-factor authentication (2FA) apps such as "Google Authenticator".
|
The Python script `extract_otp_secrets.py` extracts one time password (OTP) secrets from QR codes exported by two-factor authentication (2FA) apps such as "Google Authenticator".
|
||||||
The export QR codes from authentication apps can be provided in three ways to this script:
|
The exported QR codes from authentication apps can be read in three ways:
|
||||||
|
|
||||||
1. Capture from the system camera in a GUI,
|
1. Capture from the system camera using a GUI, _(new!)_
|
||||||
2. Image files containing the QR codes, and
|
2. Read image files containing the QR codes, and _(new!)_
|
||||||
3. Text files containing the QR code data generated by QR readers.
|
3. Read text files containing the QR code data generated by third-party QR readers.
|
||||||
|
|
||||||
The secret and otp values can be exported to json or csv files, as well as printed or saved to PNG images.
|
The secret and otp values can be exported to json or csv files, as well as printed or saved to PNG images.
|
||||||
|
|
||||||
This script/project was renamed from extract_otp_secret_keys to extract_otp_secrets in version 2.0.0.
|
**The project and the script were renamed from extract_otp_secret_keys to extract_otp_secrets in version 2.0.0.**
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -518,10 +518,10 @@ FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependenc
|
|||||||
|
|
||||||
* [ZBar](https://github.com/mchehab/zbar) is an open source software suite for reading bar codes from various sources, including webcams.
|
* [ZBar](https://github.com/mchehab/zbar) is an open source software suite for reading bar codes from various sources, including webcams.
|
||||||
* [Aegis Authenticator](https://github.com/beemdevelopment/Aegis) is a free, secure and open source 2FA app for Android.
|
* [Aegis Authenticator](https://github.com/beemdevelopment/Aegis) is a free, secure and open source 2FA app for Android.
|
||||||
* [Android OTP Extractor](https://github.com/puddly/android-otp-extractor) can extract your tokens from popular Android OTP apps and export them in a standard format or just display them as QR codes for easy importing. [Requires a _rooted_ Android phone.]
|
* [pyzbar](https://github.com/NaturalHistoryMuseum/pyzbar) is a good QR code reader Python module
|
||||||
* [Python QReader](https://github.com/Eric-Canas/QReader)
|
|
||||||
* [pyzbar](https://github.com/NaturalHistoryMuseum/pyzbar)
|
|
||||||
* [OpenCV](https://docs.opencv.org/4.x/) (CV2) Open Source Computer Vision library with [opencv-python](https://github.com/opencv/opencv-python)
|
* [OpenCV](https://docs.opencv.org/4.x/) (CV2) Open Source Computer Vision library with [opencv-python](https://github.com/opencv/opencv-python)
|
||||||
|
* [Python QReader](https://github.com/Eric-Canas/QReader) Python QR code readers
|
||||||
|
* [Android OTP Extractor](https://github.com/puddly/android-otp-extractor) can extract your tokens from popular Android OTP apps and export them in a standard format or just display them as QR codes for easy importing. [Requires a _rooted_ Android phone.]
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
|||||||
2
build.sh
2
build.sh
@@ -317,7 +317,7 @@ eval "$cmd"
|
|||||||
|
|
||||||
# Build wheel
|
# Build wheel
|
||||||
|
|
||||||
cmd="$PIP wheel .
|
cmd="$PIP wheel ."
|
||||||
if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi
|
if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ from typing import Any
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from extract_otp_secrets import QRMode
|
|
||||||
|
|
||||||
|
|
||||||
def pytest_addoption(parser: pytest.Parser) -> None:
|
def pytest_addoption(parser: pytest.Parser) -> None:
|
||||||
parser.addoption("--relaxed", action='store_true', help="run tests in relaxed mode")
|
parser.addoption("--relaxed", action='store_true', help="run tests in relaxed mode")
|
||||||
@@ -17,6 +15,7 @@ def relaxed(request: pytest.FixtureRequest) -> Any:
|
|||||||
|
|
||||||
def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
|
def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
|
||||||
if "qr_mode" in metafunc.fixturenames:
|
if "qr_mode" in metafunc.fixturenames:
|
||||||
number = 2 if metafunc.config.getoption("fast") else len(QRMode)
|
all_qr_modes = ['ZBAR', 'QREADER', 'QREADER_DEEP', 'CV2', 'CV2_WECHAT']
|
||||||
qr_modes = [mode.name for mode in QRMode]
|
number = 2 if metafunc.config.getoption("fast") else len(all_qr_modes)
|
||||||
|
qr_modes = [mode for mode in all_qr_modes]
|
||||||
metafunc.parametrize("qr_mode", qr_modes[0:number])
|
metafunc.parametrize("qr_mode", qr_modes[0:number])
|
||||||
|
|||||||
Reference in New Issue
Block a user