mirror of
https://github.com/scito/extract_otp_secrets.git
synced 2025-12-12 01:41:16 +01:00
fix mypy error
src/extract_otp_secrets.py:707: error: Argument 1 to "save" of "PyPNGImage" has incompatible type "str"; expected "SupportsWrite[bytes]" [arg-type]
This commit is contained in:
@@ -779,6 +779,11 @@ FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependenc
|
||||
* [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.]
|
||||
* [Google Authenticator secret extractor](https://github.com/krissrex/google-authenticator-exporter) is similar project written in JavaScript. It also extracts otp secrets from Google Authenticator.
|
||||
|
||||
## Third party documentation
|
||||
|
||||
* [TOTP Secret Extraction from QR codes (medium.com)](https://cavalloj.medium.com/totp-secret-extraction-from-qr-codes-ee097b4c687f)
|
||||
* [Google Authenticator: OTP-Secrets auslesen (stadt-bremerhaven.de)](https://stadt-bremerhaven.de/google-authenticator-otp-secrets-auslesen/)
|
||||
|
||||
***
|
||||
|
||||
# #StandWithUkraine 🇺🇦
|
||||
|
||||
@@ -49,7 +49,7 @@ from typing import (Any, Final, List, Optional, Sequence, TextIO, Tuple,
|
||||
TypedDict, Union)
|
||||
|
||||
import colorama
|
||||
from qrcode import QRCode # type: ignore
|
||||
from qrcode import QRCode
|
||||
|
||||
import protobuf_generated_python.google_auth_pb2 as pb
|
||||
|
||||
@@ -704,7 +704,7 @@ def save_qr_image_file(otp_url: OtpUrl, name: str) -> None:
|
||||
qr.add_data(otp_url)
|
||||
img = qr.make_image(fill_color='black', back_color='white')
|
||||
if verbose: print(f"Saving to {name}")
|
||||
img.save(name)
|
||||
img.save(name) # type: ignore
|
||||
|
||||
|
||||
def print_qr(otp_url: str, out: Optional[TextIO] = None) -> None:
|
||||
|
||||
Reference in New Issue
Block a user