HardCorePawn / multibit_recovery

Python scripts that help with recovering funds from "broken" MultiBit HD and MultiBit Classic wallets due to the "Password did not unlock the wallet" issue
MIT License
22 stars 15 forks source link

multibit_recovery

Warning

Some of these scripts extract unencrypted Private Keys from your Wallet file or Key Backup. If you are uncertain whether or not your computer is completely free of malware, you should not run this nor any other program that can affect your finances.

Even if you are certain you are currently free of malware, it is strongly advised that you not store unencrypted private keys to your hard drive.

Installation

Just download the latest version from https://github.com/HardCorePawn/multibit_recovery/archive/master.zip and unzip it to a location of your choice. There’s no installation procedure for the actual Python scripts, however there are additional requirements below.

Windows

NOTE: wll probably not work properly with Python 3... make sure you're using Python 2!

Linux

As suggested by Matthew Pilsbury you can try:

To install dependencies: pip install protobuf pylibscrypt bitcoin

To execute: python2 find_unspent_multibitHD_txes.py mbhd.wallet.aes

How to Use

find_unspent_multibitHD_txes.py

Copy your "broken" MultiBit HD wallet file (%appdata%/MulitBitHD/mbhd-\/mbhd.wallet.aes) into the folder where you extracted multibit_recovery scripts. Open a commandline at the folder where you extracted the scripts and then run the script:

Enter your wallet password and a list of Transactions in the wallet UNSPENT pool should be output along with Addresses and Amounts.

The script will then look through the first 1000 addresses/keys on the m/0'/0 (Receive Addresses) and m/0'/1 (Change Addresses) Derivation Paths. If it there is a match for an address from a transaction in the UNSPENT pool, it will dump the Address and Private Key (in "WIF Compressed" format).

Please note that some MultiBitHD wallet files may take several minutes to decrypt (if you don't have one of the optional libraries installed).

decrypt_multibit_classic_keys.py

Find your Key Backup (%appdata%/MultiBit/multibit-data/key-backup/multibit-\.key) and copy it to the folder where you extracted multibit_recovery scripts. Open a commandline at the folder where you extracted the scripts and then run the script:

Enter your wallet password and an unencrypted list of all your private keys should be output. Go and import them into another wallet like Electrum ;)

decrypt_multibit_classic_walletkeys.py

If you don't have a Key Backup, then use this script to extract the keys directly from the .wallet file. Copy your multibit.wallet file to the folder where you extracted multibit_recovery scripts. Open a commandline at the folder where you extracted the scripts and then run the script:

Enter your wallet password (if wallet was password protected) and an unencrypted list of all your Public and Private Keys should be output. Go and import them into another wallet like Electrum ;)

decrypt_multibit_classic_wallet_cipher.py

When a password is first added to a wallet, MultiBit Classic would encrypt any unencrypted backups (in the 'wallet-unenc-backup' folder) using the new wallet password. If you have such a .wallet.cipher file, you can use this script to decrypt the .cipher file and then extract the keys. Open a commandline at the folder where you extracted the scripts and then run the script:

Alternative Usage - Windows

If you're not comfortable with the commandline, you can actually use "drag and drop" (Tested on Windows). Simply drag and drop the .key or .wallet or .cipher file on the appropriate .py script file and it should automatically launch the script.

Credits

Third-party libraries distributed with multibit_recovery include: