Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: ibrahim11 on September 13, 2018, 10:11:04 PM



Title: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 13, 2018, 10:11:04 PM
So I found a few old wallets from 2013. I can't wait for bitcoin-qt to rescan every time I replace the wallet.dat to check the balance. I know you can use pywallet to dump private keys. However, I am having some trouble installing pywallet. I have installed python 2.7 and 'Twisted for python 2.7'. But I can't seem to find Zope.Interface for python 2.7?

I am also getting the error:
"File "<stdin>", line 1 Syntax error invalid syntax

Can someone help me with regards to installing pywallet.py??

Link to pywallet: https://github.com/jackjack-jj/pywallet/blob/master/README (https://github.com/jackjack-jj/pywallet/blob/master/README)

Suggestions welcome  :)


Title: Re: Found multiple old wallets - how to open?
Post by: Thirdspace on September 13, 2018, 10:46:07 PM
So I found a few old wallets from 2013. I can't wait for bitcoin-qt to rescan every time I replace the wallet.dat to check the balance.
are you using new install, latest bitcoin core version, to check them out?
do you mean redownloading the full blockchain? because rescan usually doesn't take much time
if you just need to dump private keys, turn off the sync or your internet connection
then just use dumpwallet or dumpprivkey commands on console


Title: Re: Found multiple old wallets - how to open?
Post by: jackg on September 13, 2018, 11:04:08 PM
Do as Thirdspace suggests and take the keys (save them in a file somewhere or something) and then import them into electrum (http://electrum.org/#download) while still offline and then, once deleting the file (text file) with the keys in them and setting a password on your electrum wallet, reconnect your internet...

The sync should take a maximum of a few minutes...


Title: Re: Found multiple old wallets - how to open?
Post by: bob123 on September 14, 2018, 08:44:02 AM
Do as Thirdspace suggests and take the keys (save them in a file somewhere or something) and then import them into electrum (http://electrum.org/#download) while still offline and then, once deleting the file (text file) with the keys in them and setting a password on your electrum wallet, reconnect your internet...

There is no advantage in keeping your PC offline while importing the private keys into electrum, even with a plain text file of your private keys.
Either your PC is infected (which will compromise your private keys once they are accessabe + transfer them once internet is available) or it is clean.

Keeping your every-day-pc offline for a few minutes doesn't change anything. To properly import them offline, you'll need a linux live OS which will wipe anything from memory afterwards.
But since OP is using a desktop wallet anyway, this doesn't matter since he PC has to be clean anyway.



I am also getting the error:
"File "<stdin>", line 1 Syntax error invalid syntax

Can someone help me with regards to installing pywallet.py??

That's not an installation issue.
You are trying to execute it the false way. Can you post the complete command you are entering ?

It seems like you are running the whole file within the python interpreter.
You have to run it from outside using:
Code:
python yourfile.py -argument1 -argument2

in the command line.


Title: Re: Found multiple old wallets - how to open?
Post by: crypt_farid on September 14, 2018, 09:42:30 AM
 I had no idea this was possible. Thank for the info gents. I suspect this will also be valid for all bitcoin forks that use QT?


Title: Re: Found multiple old wallets - how to open?
Post by: jackg on September 14, 2018, 09:48:49 AM
I had no idea this was possible. Thank for the info gents. I suspect this will also be valid for all bitcoin forks that use QT?

Yes it will. I wouldn't do that until you get the others out,
http://www.findmycoins.ninja/ You can import your addresses there and it'll tell you what forks you have.


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 12:36:09 PM
So I found a few old wallets from 2013. I can't wait for bitcoin-qt to rescan every time I replace the wallet.dat to check the balance.
are you using new install, latest bitcoin core version, to check them out?
do you mean redownloading the full blockchain? because rescan usually doesn't take much time
if you just need to dump private keys, turn off the sync or your internet connection
then just use dumpwallet or dumpprivkey commands on console
I'm using latest bitcoin core. And I can't use dumpprivkey on console because I don't know my wallet address!


Title: Re: Found multiple old wallets - how to open?
Post by: crypt_farid on September 14, 2018, 12:36:51 PM

 I meant other coins, forked off of bitcoin core, like LTC, Dash, etc


Title: Re: Found multiple old wallets - how to open?
Post by: jackg on September 14, 2018, 12:38:57 PM

 I meant other coins, forked off of bitcoin core, like LTC, Dash, etc

And I answered, yes. Depending on when you got the coins...


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 01:05:17 PM
Do as Thirdspace suggests and take the keys (save them in a file somewhere or something) and then import them into electrum (http://electrum.org/#download) while still offline and then, once deleting the file (text file) with the keys in them and setting a password on your electrum wallet, reconnect your internet...

There is no advantage in keeping your PC offline while importing the private keys into electrum, even with a plain text file of your private keys.
Either your PC is infected (which will compromise your private keys once they are accessabe + transfer them once internet is available) or it is clean.

Keeping your every-day-pc offline for a few minutes doesn't change anything. To properly import them offline, you'll need a linux live OS which will wipe anything from memory afterwards.
But since OP is using a desktop wallet anyway, this doesn't matter since he PC has to be clean anyway.



I am also getting the error:
"File "<stdin>", line 1 Syntax error invalid syntax

Can someone help me with regards to installing pywallet.py??

That's not an installation issue.
You are trying to execute it the false way. Can you post the complete command you are entering ?

It seems like you are running the whole file within the python interpreter.
You have to run it from outside using:
Code:
python yourfile.py -argument1 -argument2

in the command line.
I opened cmd and typed in python get-pip.py and it gives me the same error "File "<stdin>", line 1 Syntax error invalid syntax. I downloaded 'get-pip.py' and placed it into C:\python27

C:\python27\   is already added to my PATH in environment variables for PC system settings. I need pip to install Zope.Interface wheel (.whl) file.

I just want to get pywallet working so I can extract the private keys of multiple wallets to then import into electrum and not wait 3hrs+ to scan every wallet.dat I found.

Update: I've managed to install python again on my laptop but when I execute 'python get-pip.py' I get the following errors?:
https://i.imgur.com/n2lmsBs.jpg


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 01:47:55 PM

 I meant other coins, forked off of bitcoin core, like LTC, Dash, etc

And I answered, yes. Depending on when you got the coins...
Could you shed some light pls? See my post above  :)


Title: Re: Found multiple old wallets - how to open?
Post by: jackg on September 14, 2018, 02:11:55 PM

 I meant other coins, forked off of bitcoin core, like LTC, Dash, etc

And I answered, yes. Depending on when you got the coins...
Could you shed some light pls? See my post above  :)

Python comes with pip automatically?

Can you not do:
Code:
python -m pip install Zope.Interface.whl 
With Zope.Interface.whl being in the python folder.


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 03:51:36 PM

 I meant other coins, forked off of bitcoin core, like LTC, Dash, etc

And I answered, yes. Depending on when you got the coins...
Could you shed some light pls? See my post above  :)

Python comes with pip automatically?

Can you not do:
Code:
python -m pip install Zope.Interface.whl 
With Zope.Interface.whl being in the python folder.
I don’t think python 2.7 comes with pip. And you can’t install twisted for newer versions of python :( idk what to do then?


Title: Re: Found multiple old wallets - how to open?
Post by: bob123 on September 14, 2018, 04:00:47 PM
I don’t think python 2.7 comes with pip. And you can’t install twisted for newer versions of python :( idk what to do then?

Pip is by default included since python 2.7.9+.
On earlier versions you have to install it with apt-get install python-pip in linux and through running get-pip.py on windows.

Regarding your problem installing pip:
You also need OpenSSL installed on your system. Download and install it and check the OpenSSL version used by python via:
Code:
import ssl
print(ssl.OPENSSL_VERSION)

inside the python interpreter. What is the output ?


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 04:12:30 PM

 I meant other coins, forked off of bitcoin core, like LTC, Dash, etc

And I answered, yes. Depending on when you got the coins...
Could you shed some light pls? See my post above  :)

Python comes with pip automatically?

Can you not do:
Code:
python -m pip install Zope.Interface.whl 
With Zope.Interface.whl being in the python folder.

I don’t think python 2.7 comes with pip. And you can’t install twisted for newer versions of python :( idk what to do then?

Pip is by default included since python 2.7.9+.
On earlier versions you have to install it with apt-get install python-pip in linux and through running get-pip.py on windows.

Regarding your problem installing pip:
You also need OpenSSL installed on your system. Download and install it and check the OpenSSL version used by python via:
Code:
import ssl
print(ssl.OPENSSL_VERSION)

inside the python interpreter. What is the output ?

I have managed to install Python 2.7.15 (with pip included )and installed Twisted for python 2.7 by editing the registry and forcing Twisted to install - I will now try and extract private keys


Title: Re: Found multiple old wallets - how to open?
Post by: jackg on September 14, 2018, 04:13:47 PM
I don’t think python 2.7 comes with pip. And you can’t install twisted for newer versions of python :( idk what to do then?

Pip is by default included since python 2.7.9+.
On earlier versions you have to install it with apt-get install python-pip in linux and through running get-pip.py on windows.

Regarding your problem installing pip:
You also need OpenSSL installed on your system. Download and install it and check the OpenSSL version used by python via:
Code:
import ssl
print(ssl.OPENSSL_VERSION)

inside the python interpreter. What is the output ?

It's probably easier just to update python?


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 04:14:49 PM
I don’t think python 2.7 comes with pip. And you can’t install twisted for newer versions of python :( idk what to do then?

Pip is by default included since python 2.7.9+.
On earlier versions you have to install it with apt-get install python-pip in linux and through running get-pip.py on windows.

Regarding your problem installing pip:
You also need OpenSSL installed on your system. Download and install it and check the OpenSSL version used by python via:
Code:
import ssl
print(ssl.OPENSSL_VERSION)

inside the python interpreter. What is the output ?

It's probably easier just to update python?
Look at my new post  :)


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 04:22:36 PM
I don’t think python 2.7 comes with pip. And you can’t install twisted for newer versions of python :( idk what to do then?

Pip is by default included since python 2.7.9+.
On earlier versions you have to install it with apt-get install python-pip in linux and through running get-pip.py on windows.

Regarding your problem installing pip:
You also need OpenSSL installed on your system. Download and install it and check the OpenSSL version used by python via:
Code:
import ssl
print(ssl.OPENSSL_VERSION)

inside the python interpreter. What is the output ?

It's probably easier just to update python?
I'm now getting an error "No such file or directory C:\Users\xxx\Appdata\Roaming\Bitcoin\__db.001" - do I need to install bitcoin-qt?


Title: Re: Found multiple old wallets - how to open?
Post by: bob123 on September 14, 2018, 04:32:14 PM
It's probably easier just to update python?

Pywallet does not run on python3. You need python 2.x to run pywallet.



I'm now getting an error "No such file or directory C:\Users\xxx\Appdata\Roaming\Bitcoin\__db.001" - do I need to install bitcoin-qt?

What are you trying to achieve with pywallet ?
If you want to use it regularly as a wallet (not advised) you do need core + blockchain synced.

But if you only want to dump your private keys, it is not required.

How (with what flags) are you starting pywallet ?


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 14, 2018, 04:41:49 PM
It's probably easier just to update python?

Pywallet does not run on python3. You need python 2.x to run pywallet.



I'm now getting an error "No such file or directory C:\Users\xxx\Appdata\Roaming\Bitcoin\__db.001" - do I need to install bitcoin-qt?

What are you trying to achieve with pywallet ?
If you want to use it regularly as a wallet (not advised) you do need core + blockchain synced.

But if you only want to dump your private keys, it is not required.

How (with what flags) are you starting pywallet ?
I want to extract the private keys from some old btc wallets. When starting pywallet I get "Warning:root:pycrypto or libssl not found, decryption may be slow".

Then when I run the command to dump private keys I get the error "DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER)) bsddb.db.DBNoSuchFileError: (2, 'No such file or directory -- C:\Users\Ibrahim\Appdata\Roaming\Bitcoin\__db.001"


Title: Re: Found multiple old wallets - how to open?
Post by: bob123 on September 15, 2018, 07:27:32 AM
I want to extract the private keys from some old btc wallets. When starting pywallet I get "Warning:root:pycrypto or libssl not found, decryption may be slow".

This warning can be safely ignored.



Then when I run the command to dump private keys I get the error "DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER)) bsddb.db.DBNoSuchFileError: (2, 'No such file or directory -- C:\Users\Ibrahim\Appdata\Roaming\Bitcoin\__db.001"

What (exact) command are you trying to execute ?
Also, did you make sure to have a few backups of your wallet files available ? Pywallet can mess up those files pretty heavily, making them unreadable.


Title: Re: Found multiple old wallets - how to open?
Post by: ibrahim11 on September 15, 2018, 06:53:26 PM
I want to extract the private keys from some old btc wallets. When starting pywallet I get "Warning:root:pycrypto or libssl not found, decryption may be slow".

This warning can be safely ignored.



Then when I run the command to dump private keys I get the error "DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_THREAD|DB_RECOVER)) bsddb.db.DBNoSuchFileError: (2, 'No such file or directory -- C:\Users\Ibrahim\Appdata\Roaming\Bitcoin\__db.001"

What (exact) command are you trying to execute ?
Also, did you make sure to have a few backups of your wallet files available ? Pywallet can mess up those files pretty heavily, making them unreadable.

I am running this command which gives me the error stated in my other post:

pywallet.py --dumpwallet --wallet=C:\Users\xxxxxxx\wallet.dat --passphrase="xxx" > C:\Users\xxxxx\walletDump.txt