Add packaging/ with entry scripts and build_exes.py: the CLI is frozen with
PyInstaller (one-file console) and the GUI with `flet pack` (PyInstaller plus
the bundled Flet desktop runtime). Both bundle settings.yaml as data so the
frozen binaries load their defaults via importlib.resources, and the script
zips the results into release/ for upload.
Bump version to 2.0.0a0, gitignore build artifacts (*.exe, *.zip, *.spec,
dist/build/release), add a `build` extra, and document pre-built binaries and
the build process in the README.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Surface a short "About"-style tagline at the top of the README and note the
optional GUI in the pyproject description.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add src/bnet_auth_tool/gui.py: an imperative Flet 0.85 desktop app behind a
new `gui` extra, exposed as the `bnet-auth-gui` entry point. It reuses the
same vault, crypto, settings, and TOTP modules as the CLI — lock screen,
authenticator list with live rotating codes, detail dialog (QR/copy/delete),
legacy import, and online attach/retrieve (kept labelled unverified).
Add RFC 6238 TOTP code generation to totp.py (current_code / seconds_remaining,
pure stdlib) with reference-vector tests, since the GUI displays live codes.
Update README/AGENTS.md and uv.lock for the GUI.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the single-file v1.3.1 script with a proper src/bnet_auth_tool/
package: config (YAML settings + platformdirs), crypto (scrypt + AES-256-GCM
with a versioned header; legacy PBKDF2 100k/600k still decrypt), storage
(single encrypted vault), fileio (atomic 0600 writes), api, totp, migrate, and
a cli with an interactive menu plus argparse subcommands.
Security/audit fixes: drop catch-all excepts, stop leaking server bodies/tokens
in errors, atomic permission-hardened writes, explicit Ctrl-C handling,
versioned format header, best-effort passphrase scrubbing.
Add packaging (pyproject for uv, organized requirements.txt fallback, uv.lock),
.gitignore, settings.yaml, CLAUDE.md/AGENTS.md, 22 pytest tests, and ruff
config. Online attach/retrieve is preserved but kept labelled unverified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Authenticator REST API changed and broke the online flows. Realign
them with the contract used by the current official Battle.net client.
- Retrieve moved from POST /v1/authenticator/device to
POST /v2/authenticator/device and now requires an accountIdentifier
(account email or phone) alongside serial and restoreCode.
- Drop the SSO/bearer requirement from retrieve: the v2 endpoint
authenticates via accountIdentifier + serial + restoreCode, mirroring
restoreAuthenticator in the official app.
- Split the hardcoded base URL into host + per-endpoint versioned paths
(attach stays on v1: POST /v1/authenticator).
- Surface the server's {errorCode, message} and add root-cause hints
(404 route-moved vs 401/403 server-side gating) on HTTP errors.
- Handle requireHealup responses with a clear message instead of
emitting invalid credentials.
Updated README to reflect the current state of the tool as non-maintained and broken due to Blizzard's API changes. Added information on offline usage and legacy functions.
This small update focuses on a significant refactoring of the codebase to improve maintainability, readability, and structure.
The core functionality remains unchanged.
Key changes include:
- Documentation Removal: Docstrings and comments have been removed to reduce code clutter.
- Configuration Consolidation: All global constants (e.g., version info, API URLs, cryptographic parameters) are now centralized in a single AppConfig class for better organization and easier management.
- Streamlined Logic: Simplified the error handling for API requests and refined several helper functions for improved clarity and more idiomatic Python.
- Structural Enhancements: Minor improvements to the overall code structure for a cleaner and more direct implementation.
Refactors some of the code, making it cleaner and more concise.
Added an offline method of reconstructing TOTP keys and QR code provided the user has the required information.