Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: jackjack on August 19, 2011, 01:43:22 AM

Title: [GUIDE] Recover your deleted keys
Post by: jackjack on August 19, 2011, 01:43:22 AM
It works for sure on Linux (surely OSX too), Windows is still untested

  • Download Pywallet ( You only need to install Python 2.7. If you encounter some problems installing Python, post in pywallet thread, someone will answer you quickly
  • Open a console (Windows-R then "cmd" then Enter on windows)
  • Run:
cd 'the directory where you downloaded pywallet'
  • Assuming that:
    • The device you want to read is /dev/sda3
    • The size of /dev/sda3 is 30.1Gio
    • You want pywallet to write the new wallet containing the found keys in /home/jackjack/recovered_wallets
  • Run (you may have to use sudo to read devices):
./ --recover --recov_size 30.1Gio --recov_device /dev/sda3 --recov_outputdir /home/jackjack/recovered_wallets
  • Wait about 25 minutes per 100 Go, plus the time to import the keys (a few minutes)

When it's done you will see:
Importing key 102/103:
Address: 1H.....
Privkey: 5J.....

Importing key 103/103:
Address: 1P.....
Privkey: 5K.......

The new wallet /home/jackjack/recovered_wallets/recovered_wallet_1313635724.dat contains the 103 recovered keys

Title: Re: [GUIDE] Recover your deleted keys
Post by: kjj on August 19, 2011, 02:33:10 AM
Hmm.  Is there a portable way to find the size of the block device?

My first thought was to just run until it ran out of data to read, but that probably wouldn't work if there are bad blocks on the device.