Connect with us

Hi, what are you looking for?

Tutorials

What is The Bitcoin2john Script And How Do You Use It?

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.

Windows

  • 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.

Mac

  • 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.

Linux

  • 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.

$bitcoin$64$f6f82a9f0cb0eda2659fa8fb6e8a69ab72c753165427959c9828637f4142fef1$16$4f4634841b9617e4$194354$2$00$2$00

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.

https://github.com/openwall/john/blob/bleeding-jumbo/run/bitcoin2john.py

Hashcat Link: https://hashcat.net/hashcat/

You can study more about hashcat explained on wiki here

 

 

 

Support us

Crypto donation button by NOWPayments
All donations will be re-invested back into the website.
You can also sign up on NOWPayments to start receiving donations on your website too.

You May Also Like

Tutorials

Earlier Bitcoin Wallet used to be a bunch of private keys. In order to use new address, user had to generate new private key...

Tutorials

When you send Bitcoin from your wallet to some other address it needs some time for transaction confirmation in the blockchain.

Tutorials

To use Bitcoin, user generally needs two things: Private Key and Bitcoin Address.

Tutorials

Paper wallets if done right are one of the most secure ways of storing bitcoin especially if done on an air gapped computer.