From f0a9f5dd326221ba40c306b0009f41f8580ad493 Mon Sep 17 00:00:00 2001 From: CryptoGuide Date: Fri, 11 Dec 2020 09:13:31 -0500 Subject: [PATCH] Add derivation path to seed found dialogue, improve altcoin usage documentation --- README.md | 10 ++++++++++ btcrecover/addressset.py | 2 +- btcrecover/btcrpass.py | 2 +- btcrecover/btcrseed.py | 16 +++++++++++++++- create-address-db.py | 2 +- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c0e9fa7..e9ff3b62 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,16 @@ * [Descrambling 12 word seeds](docs/BIP39_descrambling_seedlists.md) (Using Tokenlist feature for BIP39 seeds via seedrecover.py) * Wallet File password recovery for a range of wallets +## Using BTCRecover with Altcoins + +By default, seedrecover.py will check common Bitcoin derivation paths for BIP39 wallets and common Ethereum derivation paths for Ethereum wallets. + +If you are trying to use BTCRecover with a supported altcoin, you will need to specify that in the command line via the --coin argument. (eg: seedrecover.py --coin LTC) + +[You can click here to view a list of the cryptos that are supported via the --coin argument, along with the derivation paths they check.](common-derivation-pathlists) + +If your wallet used different derivation paths (perhaps to try a crypto that isn't officially supported), you want to search using addresses from multiple cryptos at once, or you just want to speed things up, you can edit these files, manually specify a single derivation path via --bip32-path or add your own derivation-pathlist file and use it via the --pathlist command. + **_If you want the tool to support a crypto that isn't listed above, please test that it works and submit a PR which includes a unit test for that coin and also any required code to accept the address format._** ## Setup and Usage Tutorials ## diff --git a/btcrecover/addressset.py b/btcrecover/addressset.py index 7a0299ef..c2e8ad81 100644 --- a/btcrecover/addressset.py +++ b/btcrecover/addressset.py @@ -18,7 +18,7 @@ # along with this program. If not, see http://www.gnu.org/licenses/ -__version__ = "1.3.1-CryptoGuide" +__version__ = "1.4.0-CryptoGuide" import struct, base64, io, mmap, ast, itertools, sys, gc, glob, math from os import path diff --git a/btcrecover/btcrpass.py b/btcrecover/btcrpass.py index b1bb6d2c..6f140f42 100644 --- a/btcrecover/btcrpass.py +++ b/btcrecover/btcrpass.py @@ -21,7 +21,7 @@ # TODO: put everything in a class? # TODO: pythonize comments/documentation -__version__ = "1.3.0-Cryptoguide" +__version__ = "1.4.0-Cryptoguide" __ordering_version__ = b"0.6.4" # must be updated whenever password ordering changes disable_security_warnings = True diff --git a/btcrecover/btcrseed.py b/btcrecover/btcrseed.py index b6fc2681..f2e068f1 100644 --- a/btcrecover/btcrseed.py +++ b/btcrecover/btcrseed.py @@ -19,7 +19,7 @@ # TODO: finish pythonizing comments/documentation -__version__ = "1.3.0-CryptoGuide" +__version__ = "1.4.0-CryptoGuide" disable_security_warnings = True @@ -954,6 +954,20 @@ def _verify_seed(self, arg_seed_bytes): # print("Path: m/", current_path_index[0] - 2**31, "'/", current_path_index[1] - 2**31, "' Testing: ", binascii.hexlify(test_hash160), "against: ", binascii.hexlify(hash160),file=open("HashCheck.txt", "a")) if test_hash160 in self._known_hash160s: #Check if this hash160 is in our list of known hash160s + global seedfoundpath + seedfoundpath = "m/" + for index in current_path_index: + if index > 100: + index -= 2 ** 31 + seedfoundpath += str(index) + "'" + else: + seedfoundpath += str(index) + + seedfoundpath += "/" + + seedfoundpath += str(i) + + print(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), ": ***MATCHING SEED FOUND***, Matched on Address at derivation path:", seedfoundpath) #print("Found match with Hash160: ", binascii.hexlify(test_hash160)) return True return False diff --git a/create-address-db.py b/create-address-db.py index dd0f484f..3f51b6b9 100644 --- a/create-address-db.py +++ b/create-address-db.py @@ -31,7 +31,7 @@ import sys,argparse, atexit from os import path -__version__ = "1.3.1-CryptoGuide" +__version__ = "1.4.0-CryptoGuide" if __name__ == "__main__": print("Starting CreateAddressDB", __version__)