16 Commits
Author SHA1 Message Date
Nighthawk 0db5fa287e Merge pull request #5 from weslenng/fix/realign-authenticator-api-v2
fix: realign authenticator online flows with current Blizzard API
2026-06-13 19:28:18 -04:00
weslenng 70e5d0fc15 fix: realign authenticator online flows with current Blizzard API
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.
2026-06-13 12:04:13 -03:00
Nighthawk e0ee0067f0 Update README.md 2026-06-12 17:54:33 -04:00
Nighthawk 9f1860a0a4 Revise README for non-maintained status and usage info
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.
2026-06-12 17:53:50 -04:00
Nighthawk 9cd1dcbbdf Create bug report template for API changes
Added a bug report template for API endpoint updates with acknowledgment checkboxes.
2026-06-12 17:45:39 -04:00
Nighthawk fbd349d653 Add contact link for Blizzard Support in issue template 2026-06-12 17:45:13 -04:00
Nighthawk e13b27d2ac Delete .github directory 2026-06-12 17:44:36 -04:00
Nighthawk a6c065acc6 Create ISSUE_TEMPLATE.md for bug reports and help requests
Added a bug report/help request template with guidelines for users regarding API endpoint issues and account recovery.
2026-06-12 17:43:39 -04:00
Nighthawk 0199878312 Archive project and update README with deprecation notice
Updated README to indicate project is archived and deprecated due to changes in the Battle.net API.
2026-06-12 17:37:06 -04:00
Nighthawk fa02a8f4b7 Fix grammar in project status update
Corrected grammar in the README regarding project status.
2026-01-20 00:32:22 -05:00
Nighthawk 351c9e59b6 Fix grammar in README project status update
Corrected grammatical error in project status update.
2026-01-20 00:31:51 -05:00
Nighthawk 50c7a64c85 Revise README for project status and API changes
Updated the README to reflect the latest status of the project and changes to the Battle.net API.
2026-01-18 03:19:17 -05:00
Nighthawk cd8e6c315d Add donations section to README
Added a donations section with a Ko-fi button.
2025-12-22 18:19:01 -05:00
Nighthawk 9dc551c434 Update README.md 2025-08-31 01:26:23 -04:00
Nighthawk 2fdee4de71 Update bnet_auth_tool.py
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.
2025-08-11 00:24:50 -04:00
Nighthawk 0e4797d8ca Update bnet_auth_tool.py 2025-04-01 22:08:55 -04:00
4 changed files with 391 additions and 766 deletions
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Official Blizzard Support
url: https://us.battle.net/support/en/
about: If you are locked out of your Battle.net account, contact Blizzard. The project maintainer cannot recover your account.
+34
View File
@@ -0,0 +1,34 @@
name: "Bug Report / API Endpoint Update"
description: "Read before opening. Account recovery requests will be closed instantly."
title: "[API Update]: "
labels: ["help wanted"]
body:
- type: markdown
attributes:
value: |
# ⚠️ STOP AND READ THIS ⚠️
**Blizzard changed their API endpoints. This tool is currently broken.**
* **Account Recovery:** I cannot help you. You must contact Blizzard Customer Support.
* **Fixing the Tool:** This tool will remain broken until a developer sniffs out and provides the updated Blizzard endpoints/payload configurations.
- type: checkboxes
id: acknowledgment
attributes:
label: Mandatory Acknowledgment
description: You must agree to these terms before submitting.
options:
- label: "I understand that this tool is currently broken due to Blizzard's API changes."
required: true
- label: "I understand that the repository maintainer CANNOT recover my Battle.net account."
required: true
- type: textarea
id: technical-details
attributes:
label: Updated Endpoint Data / Technical Contribution
description: "If you have intercepted the new Blizzard API traffic, please provide the new endpoints, request headers, or payload structure here."
placeholder: "e.g., New authentication endpoint is found at..."
validations:
required: false
+42 -1
View File
@@ -1,5 +1,43 @@
# Battle.net Authenticator Tool
---
# 🛑 NOT MAINTAINED / BROKEN BY BLIZZARD 🛑
**This repository is functional ONLY as a local backup manager. Online features are dead.**
### 💻 What Happened?
Blizzard recently modified their identity API endpoints and restricted authentication scopes. This change was implemented to prevent users from extracting their raw device secrets and forcing them to use the heavy, official Battle.net mobile app for 2FA.
This tool was built using completely legal, public API access. However, because Blizzard has locked down these endpoints to restrict user choice, **you can no longer attach new authenticators or retrieve secrets online using this script.**
### 🚨 Read Before Opening an Issue:
* **Will this be fixed?** Only if a someone manages to legally map the new endpoints or payload schemas. Pull Requests are welcome.
* **Are you locked out of your account?** I have zero association with Blizzard and zero access to their backend. **Do not open an issue.** You must contact [Blizzard Customer Support](https://us.battle.net/support/en/) directly to have the authenticator detached from your account.
* **Spam Policy:** Any issue opened asking for a "fix," reporting an API connection failure, or asking for account help will be locked and deleted immediately.
---
### 🔍 Legacy Local Functions (What Still Works)
If you already ran this tool in the past and have your `battlenet_authenticator_SERIAL.json` backup file, the tool is 100% operational offline:
* **Reconstruct TOTP:** Generates your standard RFC 6238 TOTP keys (8 digits, 30s period) and outputs a QR code to import into **Aegis, Bitwarden, 1Password, or Google Authenticator**.
* **Local Security:** Encrypt or decrypt your local JSON backups using strong AES-256-GCM encryption (upgraded to 600k PBKDF2 iterations in v1.3.0).
---
## 🛠️ Offline Usage
If you are running the tool locally to regenerate keys from an existing backup:
```bash
pip install requests cryptography "qrcode[pil]"
python bnet_auth_tool.py
```
---
# Version History
Version: 1.3.0
A Python-based command-line tool for managing Battle.net software authenticators. This tool allows you to:
@@ -14,7 +52,7 @@ A Python-based command-line tool for managing Battle.net software authenticators
**Disclaimer:** This tool interacts with your Battle.net account and handles sensitive security information (authenticator secrets). Use it responsibly and at your own risk. Ensure you understand the security implications and securely manage any generated files and passphrases. The author is not responsible for any damage or loss resulting from the use of this tool.
## Features
# Features
* **Attach New Authenticator:** Guides through attaching a new virtual authenticator.
* **Retrieve Existing Secret:** Recovers the secret key if you have the Serial and Restore Code.
@@ -110,3 +148,6 @@ Version `1.3.0` introduces a significant improvement to the security of *newly e
* A QR code image containing the `otpauth://` URL.
* Scan this with your authenticator app to add the key.
* Securely delete after successful import.
## Donations
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/P5P21QRW51)
+310 -765
View File
File diff suppressed because it is too large Load Diff