We may have old wallets which we are unable to access or recover funds from. This could be because we have forgotten their passwords. To most people, those wallets are inaccessible, but there is still a chance that we may recover those wallets using a program named Bitcoin2john.
You can learn here how easily you can recover your wallet password through this simple program. This guide may be very handy for you.
What is the Bitcoin2john Script?
Bitcoin2john is a Python program that extracts the hash out of Bitcoin core wallet.dat file. When the hash is extracted, then use the hash recovery tool Hashcat to recover the lost passwords.
Perquisites for Using The Bitcoin2john Script
- You need to have the Wallet file, and it only works with Bitcoin Core wallet.dat, or the wallet.dat files of compatible devices.
- You will also need to download the hashcat program. This is used to brute-force the password of the wallet file. If the wallet had a simple password, it would be easy to recover as compare to the one with the more complex password. The longer the password, the more time it will take for the hashcat recovery tool to recover and decrypt it.
Step by Step Guide
- Copy your wallet.dat file to the Documents folder. You may also copy it to another folder but if you do then you must change the paths accordingly.
- Install Python 2.7 on your computer. The final release of Python 2.7 is 2.7.18, and it can be installed alongside Python 3. Bitcoin2john currently does not work with Python 3.
- Open a text editor and copy the Bitcoin2john script from github. (Link is provided at the end of this tutorial). Save it as bitcoin2john.py in your Documents folder.
Now to extract the hash of the bitcoin wallet, we will run the saved python script bitcoin2john.py. We will need a terminal in order to run it though, so we provide instructions for how to open the system terminal on each operating system.
- Press <Windows Key> + R (that’s the Windows key first, then R at the same time and hold them) to open the Run dialog box, then type cmd.exe and press Enter.
- Or you can go to the Taskbar and click on the Search button if you are on Windows 10, and type cmd.exe.
- Also you can open Task Manager, and go to the File > Run menu item, which will also open the Run dialog box where you can type cmd.exe.
- Open Launchpad by clicking on the Launchpad icon (it looks like a rocket ship) on the Dock.
- Look for the Terminal app, which is in the Utilities category.
- Generally, each Linux distribution will have a menu entry called Terminal, Konsole, or something similar.
- If you are using the GNOME window system, it will be called Terminal under the Applications menu on the top bar.
- If you are using KDE or another desktop, it will be inside the start menu on the bottom left called something like Konsole, Console, Terminal, or xterm.
Now run the following command inside the terminal:
python Documents/bitcoin2john.py Documents/wallet.dat > Documents/walletRecovery.hash
This command will create the walletRecovery.hash file. The walletRecovery.hash file should look like this.
We will now use hashcat for recovering the hash. The hashcat will decrypt the password using different techniques like Dictionary Attack, Brute Force Attack , Mask Attack or Hybrid Attack. You can use that password to recover your wallet.
Link To The Bitcoin2john Script
You can download the Bitcoin2john script from below mentioned web site.
Hashcat Link: https://hashcat.net/hashcat/
You can study more about hashcat explained on wiki here