Bitcoin Forum
November 05, 2024, 11:39:27 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Major noob guide needed to get my private keys from wallet.dat using pywallet  (Read 1749 times)
ColeSloth (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
December 13, 2015, 07:07:16 PM
 #1

I have an old wallet.dat that's either too old or corrupted to simply drop into bitcoin core and make work. It has been suggested that I try using pywallet to extract the keys so I can upload them to a new wallet, but I have no coding experience and have not ever used python before. It looks like I have to install a certain type of python, another program or two, and pywallet, but then all the strings I would need to type in and everything to get what I need still sounds like something I might screw up.  Ultimately, I need to get a nice idiots guide on what I need installed and what I need to type to extract the keys. Help appreciated. Thanks.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6885


Just writing some code


View Profile WWW
December 13, 2015, 07:46:28 PM
 #2

Go to https://github.com/jackjack-jj/pywallet and download the zip file. Extract the stuff to another folder.

Then go to https://www.python.org/downloads/ and download python 2.7.11. Run the installer and it will install python. Make sure that when you get to the "Customize features" screen you scroll down and click the dropdown next to "Add python.exe to path" Select "Will be installed on local hard drive" then you can continue.

Then go to https://pypi.python.org/pypi/zope.interface/4.1.3#downloads and select the correct file. The file you want will be either zope.interface-4.1.3-py2.7-win32.egg or zope.interface-4.1.3-py2.7-win-amd64.egg depending on if your windows version is 32 bit (the first file) or 64 bit (second file).

Then download https://bootstrap.pypa.io/ez_setup.py. If that link brings you to a page of text, right click and select "save as"

Go to the folder where you saved the ez_setup file and make sure that nothing is selected. Then do Shift + Right Click and in the menu that pops up select "Open command window here". In the window that pops up, type
Code:
ez_setup.py

After that runs, close that window and go to the folder where you installed python. Then go to the scripts folder within that. Copy the zope interface file you downloaded to that folder. Then open the command window again. This time type
Code:
easy_install.exe <zope filename>
where <zope filename> is the name of the file you copied.

Then go to the folder where you extracted the pywallet files and open another command window. Here just type
Code:
pywallet.py --dumpwallet > wallet.txt
This command will dump everything from the wallet to a file in the same folder called wallet.txt. If you have a passphrase on the wallet, add the option --passphrase <passphrase> to the command after pywallet.py and --dumpwallet. Make sure there are spaces between them all. If the directory where your wallet is located is not the Bitcoin default, then you will also need the --datadir=<path to directory> option also added in in the same manner as the passphrase.

ColeSloth (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
December 13, 2015, 08:34:27 PM
 #3

Go to https://github.com/jackjack-jj/pywallet and download the zip file. Extract the stuff to another folder.

Then go to https://www.python.org/downloads/ and download python 2.7.11. Run the installer and it will install python. Make sure that when you get to the "Customize features" screen you scroll down and click the dropdown next to "Add python.exe to path" Select "Will be installed on local hard drive" then you can continue.

Then go to https://pypi.python.org/pypi/zope.interface/4.1.3#downloads and select the correct file. The file you want will be either zope.interface-4.1.3-py2.7-win32.egg or zope.interface-4.1.3-py2.7-win-amd64.egg depending on if your windows version is 32 bit (the first file) or 64 bit (second file).

Then download https://bootstrap.pypa.io/ez_setup.py. If that link brings you to a page of text, right click and select "save as"

Go to the folder where you saved the ez_setup file and make sure that nothing is selected. Then do Shift + Right Click and in the menu that pops up select "Open command window here". In the window that pops up, type
Code:
ez_setup.py

After that runs, close that window and go to the folder where you installed python. Then go to the scripts folder within that. Copy the zope interface file you downloaded to that folder. Then open the command window again. This time type
Code:
easy_install.exe <zope filename>
where <zope filename> is the name of the file you copied.

Then go to the folder where you extracted the pywallet files and open another command window. Here just type
Code:
pywallet.py --dumpwallet > wallet.txt
This command will dump everything from the wallet to a file in the same folder called wallet.txt. If you have a passphrase on the wallet, add the option --passphrase <passphrase> to the command after pywallet.py and --dumpwallet. Make sure there are spaces between them all. If the directory where your wallet is located is not the Bitcoin default, then you will also need the --datadir=<path to directory> option also added in in the same manner as the passphrase.

Thanks again, knightdk. I did all of this and near as I can tell successfully installed everything, but  https://i.imgur.com/ErxzxQs.png. Is this because somewhere it's pointing to the default bitcoin core directory where it expects my bitcoin wallet to be? I installed bitcoin on a different drive, since it takes up so much space. Is there a way to either tell pywallet to look in another location, or will I have to re-install bitcoin core (and its 20GB+ 3 day long install process) in order to make this work?

Thank you so far. You instructions were spot on.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6885


Just writing some code


View Profile WWW
December 13, 2015, 08:42:33 PM
 #4

you need to use the --datadir option to point it to another directory. Your command will be
Code:
pywallet.py --datadir=<path to directory> --dumpwallet > wallet.txt
where <path to directory> is the path to the directory that contains the wallet.dat file.

ColeSloth (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
December 13, 2015, 08:55:20 PM
 #5

you need to use the --datadir option to point it to another directory. Your command will be
Code:
pywallet.py --datadir=<path to directory> --dumpwallet > wallet.txt
where <path to directory> is the path to the directory that contains the wallet.dat file.

Tried doing this, and went ahead and tried uninstalling and reinstalling bitcoin core to its default directory. both times I get this message: https://i.imgur.com/61stoV6.png. My Bitcoin is currently not running, FYI.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3542
Merit: 6885


Just writing some code


View Profile WWW
December 13, 2015, 09:37:07 PM
 #6

you need to use the --datadir option to point it to another directory. Your command will be
Code:
pywallet.py --datadir=<path to directory> --dumpwallet > wallet.txt
where <path to directory> is the path to the directory that contains the wallet.dat file.

Tried doing this, and went ahead and tried uninstalling and reinstalling bitcoin core to its default directory. both times I get this message: https://i.imgur.com/61stoV6.png. My Bitcoin is currently not running, FYI.
The wallet file might be corrupted and pywallet can't access it. There really isn't anything you can do to fix it.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4801



View Profile
December 13, 2015, 10:12:28 PM
 #7

jackjack, the creator of pywallet, hasn't been active on the forum since March, but he may still check his messages or may get them forwarded to his email.

You can try sending him a personal message on the forum and see if he can offer any help.  Otherwise you may find that someone familiar with his code can help you get it working enough to recover something form the wallet.

https://bitcointalk.org/index.php?action=profile;u=21053

You also might find some help if you ask in the pywallet 2.2 announcement thread here:
https://bitcointalk.org/index.php?topic=34028.500
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!