mirror of
https://github.com/scito/extract_otp_secret_keys.git
synced 2025-12-06 06:44:57 +01:00
initial pyproject.toml
This commit is contained in:
parent
82e43172c3
commit
7f5d4b37ee
10 changed files with 181 additions and 76 deletions
|
|
@ -11,5 +11,5 @@ insert_final_newline = true
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.yml]
|
[*.{yml,toml}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
||||||
4
.vscode/extensions.json
vendored
4
.vscode/extensions.json
vendored
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"ms-python.python"
|
"ms-python.python",
|
||||||
|
"mms-python.isort",
|
||||||
|
"tamasfe.even-better-toml",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
40
.vscode/launch.json
vendored
Normal file
40
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: extract_otp_secret_keys.py",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "extract_otp_secret_keys.py",
|
||||||
|
"args": [
|
||||||
|
"example_export.txt"
|
||||||
|
],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python: extract_otp_secret_keys.py stdin pic",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "extract_otp_secret_keys.py",
|
||||||
|
"args": [
|
||||||
|
"-",
|
||||||
|
"<",
|
||||||
|
"test/test_googleauth_export.png",
|
||||||
|
],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Python: extract_otp_secret_keys.py -C",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "extract_otp_secret_keys.py",
|
||||||
|
"args": [
|
||||||
|
"-v",
|
||||||
|
],
|
||||||
|
"console": "integratedTerminal"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
FROM python:3.11-slim-bullseye
|
FROM python:3.11-slim-bullseye
|
||||||
|
|
||||||
|
# For debugging
|
||||||
|
# docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extract_otp_secret_keys
|
||||||
|
# docker run --entrypoint /bin/bash -it --rm -v "$(pwd)":/files:ro --device="/dev/video0:/dev/video0" --env="DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix:ro extract_otp_secret_keys
|
||||||
|
|
||||||
WORKDIR /extract
|
WORKDIR /extract
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
FROM python:3.11-alpine
|
FROM python:3.11-alpine
|
||||||
|
|
||||||
|
# For debugging
|
||||||
|
# docker run --entrypoint /bin/sh -it --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader
|
||||||
|
# docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed
|
||||||
|
|
||||||
WORKDIR /extract
|
WORKDIR /extract
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
|
||||||
|
|
@ -353,16 +353,11 @@ docker run --rm -v "$(pwd)":/files:ro -i extract_otp_secret_keys = < example_exp
|
||||||
docker run --rm -v "$(pwd)":/files:ro -i --device="/dev/video0:/dev/video0" --env="DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix:ro extract_otp_secret_keys
|
docker run --rm -v "$(pwd)":/files:ro -i --device="/dev/video0:/dev/video0" --env="DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix:ro extract_otp_secret_keys
|
||||||
docker run --pull always --rm -v "$(pwd)":/files:ro -i --device="/dev/video0:/dev/video0" --env="DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix:ro scit0/extract_otp_secret_keys
|
docker run --pull always --rm -v "$(pwd)":/files:ro -i --device="/dev/video0:/dev/video0" --env="DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix:ro scit0/extract_otp_secret_keys
|
||||||
docker run --entrypoint /bin/bash -it --rm -v "$(pwd)":/files:ro extract_otp_secret_keys
|
docker run --entrypoint /bin/bash -it --rm -v "$(pwd)":/files:ro extract_otp_secret_keys
|
||||||
docker run --entrypoint /bin/bash -it --rm -v "$(pwd)":/files:ro --device="/dev/video0:/dev/video0" --env="DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix:ro scit0/extract_otp_secret_keys
|
|
||||||
docker run --pull always --rm -v "$(pwd)":/files:ro -i scit0/extract_otp_secret_keys
|
docker run --pull always --rm -v "$(pwd)":/files:ro -i scit0/extract_otp_secret_keys
|
||||||
docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extract_otp_secret_keys
|
|
||||||
|
|
||||||
docker login -uscit0
|
docker login -uscit0
|
||||||
docker build . -t extract_otp_secret_keys_no_qr_reader -f Dockerfile_no_qr_reader --pull
|
docker build . -t extract_otp_secret_keys_no_qr_reader -f Dockerfile_no_qr_reader --pull
|
||||||
docker build . -t extract_otp_secret_keys_no_qr_reader -f Dockerfile_no_qr_reader --pull --build-arg RUN_TESTS=false
|
docker build . -t extract_otp_secret_keys_no_qr_reader -f Dockerfile_no_qr_reader --pull --build-arg RUN_TESTS=false
|
||||||
docker run --entrypoint /bin/sh -it --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader
|
|
||||||
docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader
|
|
||||||
docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed
|
|
||||||
docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro scit0/extract_otp_secret_keys_no_qr_reader test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed
|
docker run --entrypoint /extract/run_pytest.sh --rm -v "$(pwd)":/files:ro scit0/extract_otp_secret_keys_no_qr_reader test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed
|
||||||
docker run --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader example_export.txt
|
docker run --rm -v "$(pwd)":/files:ro extract_otp_secret_keys_no_qr_reader example_export.txt
|
||||||
docker run --rm -v "$(pwd)":/files:ro -i extract_otp_secret_keys_no_qr_reader - < example_export.txt
|
docker run --rm -v "$(pwd)":/files:ro -i extract_otp_secret_keys_no_qr_reader - < example_export.txt
|
||||||
|
|
|
||||||
57
pyproject.toml
Normal file
57
pyproject.toml
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
[build-system]
|
||||||
|
requires = [
|
||||||
|
"setuptools>=64.0.0", "wheel>=0.37.0", "pip", "setuptools-scm",
|
||||||
|
]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "extract_otp_secret_keys"
|
||||||
|
# https://pypi.org/classifiers/
|
||||||
|
classifiers = [
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Environment :: Console",
|
||||||
|
"Environment :: X11 Applications :: Qt",
|
||||||
|
"Environment :: Win32 (MS Windows)",
|
||||||
|
"Topic :: System :: Archiving :: Backup",
|
||||||
|
"Topic :: Utilities",
|
||||||
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Intended Audience :: End Users/Desktop",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Intended Audience :: System Administrators",
|
||||||
|
"Programming Language :: Python",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
]
|
||||||
|
version = "1.6.0"
|
||||||
|
dependencies = [
|
||||||
|
"protobuf",
|
||||||
|
"qrcode",
|
||||||
|
"Pillow",
|
||||||
|
"qreader",
|
||||||
|
"pyzbar",
|
||||||
|
"opencv-python",
|
||||||
|
"typing_extensions; python_version<='3.7'",
|
||||||
|
]
|
||||||
|
description = "Extract two-factor authentication (2FA, TFA, OTP) secret keys from export QR codes of 'Google Authenticator' app"
|
||||||
|
# TODO dynamic = ["version"]
|
||||||
|
keywords = ["python", "security", "json", "otp", "csv", "protobuf", "qrcode", "two-factor", "totp", "google-authenticator", "recovery", "proto3", "mfa", "two-factor-authentication", "tfa", "qr-codes", "otpauth", "2fa", "security-tools"]
|
||||||
|
license = {text = "GNU General Public License v3 (GPLv3)"}
|
||||||
|
readme = "README.md"
|
||||||
|
authors = [{name = "scito", email = "info@scito.ch"}]
|
||||||
|
maintainers = [{name = "scito", email = "info@scito.ch"}]
|
||||||
|
requires-python = ">=3.7, <4"
|
||||||
|
scripts = {extract_otp_secret_keys = "extract_otp_secret_keys:sys_main"}
|
||||||
|
urls = {Project-URL = "https://github.com/scito/extract_otp_secret_keys", Bug-Reports = "https://github.com/scito/extract_otp_secret_keys/issues", Source = "https://github.com/scito/extract_otp_secret_keys" }
|
||||||
|
|
||||||
|
[tool.setuptools]
|
||||||
|
py-modules = ["extract_otp_secret_keys", "protobuf_generated_python.google_auth_pb2"]
|
||||||
|
|
||||||
|
[tool.setuptools.dynamic]
|
||||||
|
# TODO version = {attr = "extract_otp_secret_keys.VERSION"}
|
||||||
|
|
||||||
|
[tool.setuptools.package-data]
|
||||||
|
"*" = ["*.txt", "*.json", "*.png", "*.md"]
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
wheel
|
|
||||||
pytest
|
|
||||||
flake8
|
flake8
|
||||||
pylint
|
|
||||||
pytest-mock
|
|
||||||
pytest-cov
|
|
||||||
mypy
|
mypy
|
||||||
types-protobuf
|
types-protobuf
|
||||||
|
pylint
|
||||||
|
pytest
|
||||||
|
pytest-mock
|
||||||
|
pytest-cov
|
||||||
setuptools
|
setuptools
|
||||||
|
wheel
|
||||||
|
build
|
||||||
|
|
|
||||||
65
setup.cfg
Normal file
65
setup.cfg
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
[metadata]
|
||||||
|
name = extract_otp_secret_keys
|
||||||
|
version = 1.6.0
|
||||||
|
long_description = file: README.md
|
||||||
|
description = Extract two-factor authentication (2FA, TFA, OTP) secret keys from export QR codes of "Google Authenticator" app
|
||||||
|
long_description_content_type = text/markdown
|
||||||
|
url = https://github.com/scito/extract_otp_secret_keys
|
||||||
|
author = scito
|
||||||
|
author_email = info@scito.ch
|
||||||
|
maintainer = scito
|
||||||
|
maintainer_email = info@scito.ch
|
||||||
|
license = GNU General Public License v3 (GPLv3)
|
||||||
|
keywords = python security json otp csv protobuf qrcode two-factor totp google-authenticator recovery proto3 mfa two-factor-authentication tfa qr-codes otpauth 2fa security-tools
|
||||||
|
|
||||||
|
# https://pypi.org/classifiers/
|
||||||
|
classifiers =
|
||||||
|
Development Status :: 5 - Production/Stable
|
||||||
|
Environment :: Console
|
||||||
|
Environment :: X11 Applications :: Qt
|
||||||
|
Environment :: Win32 (MS Windows)
|
||||||
|
Topic :: System :: Archiving :: Backup
|
||||||
|
Topic :: Utilities
|
||||||
|
Programming Language :: Python :: 3.7
|
||||||
|
Programming Language :: Python :: 3.8
|
||||||
|
Programming Language :: Python :: 3.9
|
||||||
|
Programming Language :: Python :: 3.10
|
||||||
|
Programming Language :: Python :: 3.11
|
||||||
|
Intended Audience :: End Users/Desktop
|
||||||
|
Intended Audience :: Developers
|
||||||
|
Intended Audience :: System Administrators
|
||||||
|
Programming Language :: Python
|
||||||
|
Natural Language :: English
|
||||||
|
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
||||||
|
|
||||||
|
[options]
|
||||||
|
python_requires = >=3.7, <4
|
||||||
|
py_modules = extract_otp_secret_keys, protobuf_generated_python.google_auth_pb2
|
||||||
|
# install_requires =
|
||||||
|
# protobuf
|
||||||
|
# qrcode
|
||||||
|
# Pillow
|
||||||
|
# qreader
|
||||||
|
# pyzbar
|
||||||
|
# opencv-python
|
||||||
|
# typing_extensions;python_version<='3.7'
|
||||||
|
packages = find:
|
||||||
|
package_dir =
|
||||||
|
= .
|
||||||
|
project_urls =
|
||||||
|
Bug Reports = https://github.com/scito/extract_otp_secret_keys/issues
|
||||||
|
Source = https://github.com/scito/extract_otp_secret_keys
|
||||||
|
|
||||||
|
# [options.entry_points]
|
||||||
|
# console_scripts =
|
||||||
|
# extract_otp_secret_keys = extract_otp_secret_keys:sys_main
|
||||||
|
|
||||||
|
[options.packages.find]
|
||||||
|
where = "."
|
||||||
|
|
||||||
|
[options.package_data]
|
||||||
|
* =
|
||||||
|
*.txt
|
||||||
|
*.json
|
||||||
|
*.png
|
||||||
|
*.md
|
||||||
65
setup.py
65
setup.py
|
|
@ -1,68 +1,5 @@
|
||||||
import pathlib
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
# compatibility with legacy builds or versions of tools that don’t support certain packaging standards
|
||||||
setup(
|
setup(
|
||||||
name='extract_otp_secret_keys',
|
|
||||||
version='1.6.0',
|
|
||||||
description='Extract two-factor authentication (2FA, TFA, OTP) secret keys from export QR codes of "Google Authenticator" app',
|
|
||||||
|
|
||||||
long_description=(pathlib.Path(__file__).parent / 'README.md').read_text(),
|
|
||||||
long_description_content_type='text/markdown',
|
|
||||||
|
|
||||||
url='https://github.com/scito/extract_otp_secret_keys',
|
|
||||||
author='scito',
|
|
||||||
author_email='info@scito.ch',
|
|
||||||
|
|
||||||
# https://pypi.org/classifiers/
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 5 - Production/Stable',
|
|
||||||
|
|
||||||
'Environment :: Console',
|
|
||||||
'Environment :: X11 Applications :: Qt',
|
|
||||||
'Environment :: Win32 (MS Windows)',
|
|
||||||
'Environment :: MacOS X',
|
|
||||||
'Topic :: System :: Archiving :: Backup',
|
|
||||||
'Topic :: Utilities',
|
|
||||||
|
|
||||||
'Programming Language :: Python :: 3.7',
|
|
||||||
'Programming Language :: Python :: 3.8',
|
|
||||||
'Programming Language :: Python :: 3.9',
|
|
||||||
'Programming Language :: Python :: 3.10',
|
|
||||||
'Programming Language :: Python :: 3.11',
|
|
||||||
|
|
||||||
'Intended Audience :: End Users/Desktop',
|
|
||||||
'Intended Audience :: Developers',
|
|
||||||
'Intended Audience :: System Administrators',
|
|
||||||
|
|
||||||
'Programming Language :: Python',
|
|
||||||
'Natural Language :: English',
|
|
||||||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
|
||||||
],
|
|
||||||
|
|
||||||
keywords='python security json otp csv protobuf qrcode two-factor totp google-authenticator recovery proto3 mfa two-factor-authentication tfa qr-codes otpauth 2fa security-tools',
|
|
||||||
|
|
||||||
py_modules=['extract_otp_secret_keys', 'protobuf_generated_python.google_auth_pb2'],
|
|
||||||
entry_points={
|
|
||||||
'console_scripts': [
|
|
||||||
'extract_otp_secret_keys = extract_otp_secret_keys:sys_main',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
python_requires='>=3.7, <4',
|
|
||||||
install_requires=[
|
|
||||||
"protobuf",
|
|
||||||
"qrcode",
|
|
||||||
"Pillow",
|
|
||||||
"qreader",
|
|
||||||
"pyzbar",
|
|
||||||
"opencv-python",
|
|
||||||
"typing_extensions;python_version<='3.7'"
|
|
||||||
],
|
|
||||||
|
|
||||||
project_urls={
|
|
||||||
'Bug Reports': 'https://github.com/scito/extract_otp_secret_keys/issues',
|
|
||||||
'Source': 'https://github.com/scito/extract_otp_secret_keys',
|
|
||||||
},
|
|
||||||
|
|
||||||
license='GNU General Public License v3 (GPLv3)',
|
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue