From a5708d79e43a7e0e62c1f500bad4ffb641231c74 Mon Sep 17 00:00:00 2001 From: ducla Date: Mon, 9 Dec 2024 02:04:44 +0700 Subject: [PATCH 1/2] fix: can not recognize dogechain wallet --- btcrecover/btcrpass.py | 6 ++-- .../blockchain-com.wallet.aes.json | 29 +++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 btcrecover/test/test-wallets/blockchain-com.wallet.aes.json diff --git a/btcrecover/btcrpass.py b/btcrecover/btcrpass.py index a5aff322..684120a0 100644 --- a/btcrecover/btcrpass.py +++ b/btcrecover/btcrpass.py @@ -318,6 +318,7 @@ def load_wallet(wallet_filename): with open(wallet_filename, "rb") as wallet_file: for wallet_type in wallet_types: found = wallet_type.is_wallet_file(wallet_file) + # print(f"Wallet name: {wallet_type}, Found: {found}") if found: wallet_file.close() return wallet_type.load_from_filename(wallet_filename) @@ -333,6 +334,7 @@ def load_wallet(wallet_filename): uncertain_errors = [] for wallet_type in uncertain_wallet_types: try: + print("Wallet name: ", wallet_type) return wallet_type.load_from_filename(wallet_filename) except Exception as e: uncertain_errors.append(wallet_type.__name__ + ": " + str(e)) @@ -2142,6 +2144,7 @@ def passwords_per_seconds(self, seconds): return max(int(round(self._passwords_per_second * seconds)), 1) # Load a Blockchain wallet file (the part of it we need) + # dalmate: need to see if blockchain or dogechain wallet @classmethod def load_from_filename(cls, wallet_filename): with open(wallet_filename) as wallet_file: @@ -2163,7 +2166,6 @@ def _parse_encrypted_blockchain_wallet(data): try: data = json.loads(data) except ValueError: break - # Config files have no version attribute; they encapsulate the wallet file plus some detrius if "version" not in data: try: @@ -2893,7 +2895,7 @@ def is_wallet_file(wallet_file): try: walletdata = wallet_file.read() except: return False - return (b"email" in walletdata and b"two_fa_method" in walletdata) # Dogechain.info wallets have email and 2fa fields that are fairly unique + return ((b"email" in walletdata and b"two_fa_method" in walletdata)|(b"guid" in walletdata and b"salt" in walletdata)) # Dogechain.info wallets have email and 2fa fields that are fairly unique def __init__(self, iter_count, loading=False): assert loading, 'use load_from_* to create a ' + self.__class__.__name__ diff --git a/btcrecover/test/test-wallets/blockchain-com.wallet.aes.json b/btcrecover/test/test-wallets/blockchain-com.wallet.aes.json new file mode 100644 index 00000000..9f5853dc --- /dev/null +++ b/btcrecover/test/test-wallets/blockchain-com.wallet.aes.json @@ -0,0 +1,29 @@ +{ + "auth_type": 0, + "real_auth_type": 0, + "symbol_local": { + "symbol": "$", + "code": "USD", + "symbolAppearsAfter": false, + "name": "U.S. dollar", + "local": true, + "conversion": 0 + }, + "clientTimeDiff": 971, + "war_checksum": "8d781bd1d88b5bc7", + "language": "en", + "symbol_btc": { + "symbol": "BTC", + "code": "BTC", + "symbolAppearsAfter": true, + "name": "Bitcoin", + "local": false, + "conversion": 100000000.00000000 + }, + "extra_seed": "21ffed321ea9f2598ba240ed4a0ff80a3afd0101710cfc79212683d320c86acb969f6c86424c01e311adc6af01c5d54cb43b51ae18cfb44010eec8b20e5d8741", + "payload": "{\"payload\":\"2pb4cHhC3U\/xQWT2NdGlZ16tEWYslwLg2ua\/5GI6g9Gk6xEBj3qLPFy8\/4PXmBffOPr+H2i15lGKXEPSXzaVzBamdiRrMab8oVjesnHavESQzTElYIIUrV3wkaqnoDH7N1c5CqwrRRAU9SKg1bzKqVROUclV26eWEDQWcvLKKZIplhuzN66FGlf4Qq7E4Fw\/v848KNFrwIkmJiJlVvB6SR4X4quUHqsPCfLQy5Uk8buFCb1P5gtQhIbjWgzDaIvT9Pq821ggV6j94O2d5MpDrNTjvZK8QFbG2\/nbNVIRtynoKlcLMZVHzj14J+mBAXPxUXaz3m\/jl7OzwuXxaeyyjs6584BiCB7sjRM2B7EOgXDyFPTJRj3E\/IZK0JkxGBX\/+Glx7Xf4R9bC5vYpN8hCXBOcmOMAJ1CvnlC2L+p1XXJ\/rZfLiYkTYuY8w2UGMq7Qa5FhW8wahS+3Y3qBlGnsfyKQAT1chfM4PYmCTPbvSnQLAdXGjNYSs1yBkSat7lBdxD1qiVrSaM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HogdhRXAR4DOrf9iqleZQ+Zc2yoR3BRfVFlemaFzat7hoinI9wdHv2lZ+IPzdhD7pMe2RwP0+K+JtRMYbL5AyYoXqWJj4vtp+PnMKUAmna6eC82qAnIhrzWW3sZwzomTs6v\/sYDP6BKDecZ1Zk5bNnELZ72TXJcn+a+0INjSAoe9B9MwpOCyydeMzzRt+LFixWlfYLlbzw9vGcoU+6csufKsHxb8hFuO4REcgAof+5paJioHF50Il8\/JND9raPUKLeEaQNf9MTKFvGusn+JOO\/EneYpp471kVbZFdN1HgCN8Ve8r7YodINmCxyZiYEkEMrhFZ82anRMGhPlVv9WfQQta+ASHK5rHZozzF3q9nZk7acAbBqpjqpmq\/Q\/M4NFCl7JMBHqpJyKx5qSJp\/9q2+J4FdZ6qXINwvXjB4+2yiwjA4frhA\/bdi9j7m52QcY8tf6pxyba4XVTxOIods7g0hbMv3j9nyiLL407knW03PWU5Shgs3gI9l+iyZKnbiKAzGWFSjeds3FUATavNU7vZZYIe4O3RsheAoPvwRJWKIbmm9OyOPyYhmxenWkzLcr88K3bnTXjptz7ltd3c6ubAXGIhWbGx4cg==\",\"pbkdf2_iterations\":5000,\"version\":4}", + "guid": "438eb25e-7d46-40ba-9888-42c44f083e7c", + "serverTime": 1733669581254, + "payload_checksum": "c7f280ba8054b4464b96b98de031d8b8f1a10a592ac684c0bce072736c3f7de4", + "sync_pubkeys": false +} \ No newline at end of file From bf4935666632697b53429ec7eb362bc6f6d6f7a3 Mon Sep 17 00:00:00 2001 From: ducla Date: Mon, 9 Dec 2024 02:09:33 +0700 Subject: [PATCH 2/2] fix: can not recognize dogechain wallet --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 712913c8..4a517b34 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,14 @@ If you mostly know your recovery seed/mnemonic (12-24 recovery words), but think ## If this tool or other content on my YouTube channel was helpful, feel free to send a tip to: ## +If you think my work is ok, you can donate to me (or send me your ideas to improve this tool): + +ETH: 0xDAE2F3c8a710F7C27dfC0d05A00fE53B8139175D + +## Thanks to 3rdIteration ## + +I cloned this project from him just for improving. If you think you can donate, you can send something to him, instead of me :) + ![Donate Bitcoin](docs/Images/donate-btc-qr.png) BTC: 37N7B7sdHahCXTcMJgEnHz7YmiR4bEqCrS