Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Adriano2010 on December 12, 2018, 11:54:51 PM



Title: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Adriano2010 on December 12, 2018, 11:54:51 PM
Hi. One of my friends found on a usb stick a wallet.dat backup and i go today to see if has some bitcoin on it and i tried electrum but not working and after bitcoin core, but after i put wallet.dat on bitcoin core at first open get this error

https://i.postimg.cc/PrhmBXkh/salvagee.png

And after a .bak file was created, and now when open bitcoin core appears this
https://i.postimg.cc/QMB5pVcg/Untitled.png

Is there any chance to see bitcoin addresses of wallet or does it need to full sync?

On receiving address tab all is empty.



Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Rickorick on December 13, 2018, 12:09:21 AM
copy the address and paste on a block explorer like blockchain.info


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Adriano2010 on December 13, 2018, 12:10:41 AM
copy the address and paste on a block explorer like blockchain.info

The problem is that bitcoin core not show any address on receiving tab. And i can't find any info how to find address from a wallet.dat


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: jackg on December 13, 2018, 12:13:59 AM
If the recieving address is empty. There’s probably a good chance there wipers to any funds to start with in that wallet since it said it’s been able to load keys alright.

I might be completely wrong but this is just my interpretation. Maybe a copy of the debug log for the second instance might be helpful? Open command prompt and type notepad D:\btccore\debug.log and post it here?


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Adriano2010 on December 13, 2018, 12:41:48 AM
If the recieving address is empty. There’s probably a good chance there wipers to any funds to start with in that wallet since it said it’s been able to load keys alright.

I might be completely wrong but this is just my interpretation. Maybe a copy of the debug log for the second instance might be helpful? Open command prompt and type notepad D:\btccore\debug.log and post it here?

i get this error when trying to post
Code:
413 Request Entity Too Large


I upload file here https://ufile.io/im3r7


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: bob123 on December 13, 2018, 07:00:31 AM
i get this error when trying to post
Code:
413 Request Entity Too Large


I upload file here https://ufile.io/im3r7


Use pastebin.com (https://pastebin.com/) or a similar service.

I doubt the majority will download a file just to look at your debug.log.


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Thirdspace on December 13, 2018, 12:31:29 PM
The problem is that bitcoin core not show any address on receiving tab. And i can't find any info how to find address from a wallet.dat
on bitcoin core... have you tried dumpwallet command on its debug console?
if that doesn't work, try listreceivedbyaddress 0 true


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: keychainX on December 13, 2018, 01:08:03 PM
Hi. One of my friends found on a usb stick a wallet.dat backup and i go today to see if has some bitcoin on it and i tried electrum but not working and after bitcoin core, but after i put wallet.dat on bitcoin core at first open get this error

And after a .bak file was created, and now when open bitcoin core appears this

Is there any chance to see bitcoin addresses of wallet or does it need to full sync?

On receiving address tab all is empty.



Looking at the dump, your node is crashing after syncing at block height=237172
And it also seems your wallet.dat is corrupt or in old format.

The fastest and quick/dirty way is open the wallet.dat with nodepad (PC), texteditor(mac) or gedit (ubuntu)
Search for the string "name" and after that you should see a 34 character string starting with "1" which is most probably a bitcoin address which you can check balance online with blockchain.info

Another step I would recommend is to download pywallet from github, https://github.com/jackjack-jj/pywallet which can parse the wallet for you and see what version, addresses etc. There is also a web wrapper on port 8989 so its much easier to use. If you have a PC, you can check your ip in a terminal with ipconfig, then use that ip, like 192.168.0.10 and add ":8989" in a browser and you would be able to open the wallet with a friendly interface. You would first need to run pywallet with "python pywallet.py -web" to start it. Then in a browser type "192.168.0.YOURIP:8989"

You could also try to run this command: python pywallet.py –dumpwallet -datadir="yourpath" > wallet.text --passphrase= PASSPHRASE
to try to dump it.

Third step would be to try to "fix" the wallet which is saving data which can be saved, you would need to run the bitcoin core start command in a terminal with the command option "-salvagewallet" ,it will make a dump of whatever is correct data.

If you need more in depth guidance on any above, just let me know.

/KX



Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Adriano2010 on December 13, 2018, 02:53:14 PM
I don't have a pro account on pastebin bob123
 
Do you know any other service?

https://i.postimg.cc/QMYcMFGw/pastebin.png

ETFbitcoin i tried but i didn't find this

Thirdspace tried but not working i get only this [  ] and not show any address

keychainX I will try pywallet, do i need to install Python? Which version?


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: keychainX on December 13, 2018, 03:06:32 PM
I don't have a pro account on pastebin bob123
 
Do you know any other service?

ETFbitcoin i tried but i didn't find this

Thirdspace tried but not working i get only this [  ] and not show any address

keychainX I will try pywallet, do i need to install Python? Which version?


Yes, Python is required to run pywallet. The version you need is 2.7, you can find it here: https://www.python.org/download/releases/2.7/

/KX


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: TryNinja on December 13, 2018, 03:14:32 PM
Regarding pastebin, you dont need pro to paste the log, just register, its or free
You need when you're pasting a big file (bigger than 512 kb). Just check the image OP posted above...

Actually, even with PRO he wouldn't be able to do it. His file is 16 Mb and Pastebin PRO only allows 10 Mb files.


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: keychainX on December 13, 2018, 03:20:02 PM
Regarding pastebin, you dont need pro to paste the log, just register, its or free
You need when you're pasting a big file (bigger than 512 kb). Just check the image OP posted above...

Actually, even with PRO he wouldn't be able to do it. His file is 16 Mb and Pastebin PRO only allows 10 Mb files.

Ok, this is his last lines from his log, the previous are just repetitive

2018-12-13T00:30:22Z UpdateTip: new best=000000000000005d97ffd8e3de49417917eece7c720534d09f167c2139918d82 height=237171 version=0x00000002 log2_work=70.087251 tx=18178591 date='2013-05-21T08:40:56Z' progress=0.050560 cache=105.3MiB(747947txo)
2018-12-13T00:30:24Z tor: Thread interrupt
2018-12-13T00:30:24Z addcon thread exit
2018-12-13T00:30:24Z torcontrol thread exit
2018-12-13T00:30:24Z Shutdown: In progress...
2018-12-13T00:30:24Z net thread exit
2018-12-13T00:30:24Z UpdateTip: new best=00000000000000d7f9fdde1cdb2230d913662746bf9eb11c87b9a97b6ae47990 height=237172 version=0x00000002 log2_work=70.087306 tx=18179155 date='2013-05-21T09:05:47Z' progress=0.050561 cache=105.3MiB(748294txo)
2018-12-13T00:30:24Z msghand thread exit
2018-12-13T00:30:25Z opencon thread exit
2018-12-13T00:30:25Z scheduler thread interrupt
2018-12-13T00:30:25Z Dumped mempool: 0s to copy, 0.064004s to dump
2018-12-13T00:30:44Z [default wallet] Releasing wallet
2018-12-13T00:30:44Z Shutdown: done


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Pmalek on December 13, 2018, 04:52:34 PM
Quote
If it's encrypted you need to install the wallet to see the addresses, but then you can just copy them and check online instead of downloading the entire blockchain.
Source: https://www.reddit.com/r/Bitcoin/comments/7o3cob/quicked_way_to_check_walletdat_address_balance/

Another user had a similar issue and that was the solution from reddit.


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: jackg on December 13, 2018, 07:32:53 PM
@ETF this probably calls for the use of pywallet, and failing that, a check to see if there are any other wallet.dat backups from around that time that might hold the uncorrupted private and public keys.

EDIT: actually can he not just hit the new address button? Won't that show his original addresses that are next from the keypool?

@keychainX, you've just essentially posted something that means he can shut down core ;D


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Effingham Hoofnagle on December 13, 2018, 09:54:53 PM
Hi. One of my friends found on a usb stick a wallet.dat backup and i go today to see if has some bitcoin on it and i tried electrum but not working and after bitcoin core, but after i put wallet.dat on bitcoin core at first open get this error

https://i.postimg.cc/PrhmBXkh/salvagee.png

And after a .bak file was created, and now when open bitcoin core appears this
https://i.postimg.cc/QMB5pVcg/Untitled.png

Is there any chance to see bitcoin addresses of wallet or does it need to full sync?

On receiving address tab all is empty.



If you or your friend is poking around a "found" usb with btc data...on a computer that you use regularly and/or with your personal wallet on it,  there's a really good chance that you'll soon be back here posting about how your wallet was hacked.
If I was you and had a wallet on a computer that you plugged that usb into, I'd move the funds to a different wallet on a different computer of phone, STAT.

You dont mention it, so I assume you didnt do this: anytime you find a USB and want to see whats on it, you should use a "live CD" boot on your computer.



Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Adriano2010 on December 14, 2018, 02:46:51 AM
-snip-

If you or your friend is poking around a "found" usb with btc data...on a computer that you use regularly and/or with your personal wallet on it,  there's a really good chance that you'll soon be back here posting about how your wallet was hacked.
If I was you and had a wallet on a computer that you plugged that usb into, I'd move the funds to a different wallet on a different computer of phone, STAT.

You dont mention it, so I assume you didnt do this: anytime you find a USB and want to see whats on it, you should use a "live CD" boot on your computer.



In this laptop i don't have any wallet, and the usb stick belongs to my friend.

I use hardware wallets anyway.


https://i.postimg.cc/vBdjFrML/ecdsapy.png

keychainX can you tell me steps i should follow now and what to do to see address?


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: keychainX on December 14, 2018, 08:44:34 AM

In this laptop i don't have any wallet, and the usb stick belongs to my friend.

I use hardware wallets anyway.

keychainX can you tell me steps i should follow now and what to do to see address?

You need to install ecdsa package ( https://pypi.org/project/ecdsa/0.6/ ) and twisted if you want to run the webinterface, twisted is here: https://twistedmatrix.com/trac/wiki/Downloads

When packages are installed run
"python pywallet.py --web" (runs pywallet web interface)
in a browser open "http://localhost:8989"
Follow instructions to open wallet.dat to browse it.

/KX

PS. You can also check this thread and run it on the usb stick https://bitcointalk.org/index.php?topic=38004.0



Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: Adriano2010 on December 14, 2018, 03:36:46 PM
https://i.postimg.cc/RVQfBD6D/error.png

I get this error when trying to dump. Can you tell me what command to run on cmd to try dump and get addresses?


Title: Re: How to see bitcoin core addresses on an encrypted wallet.dat
Post by: keychainX on December 15, 2018, 09:39:34 AM

I get this error when trying to dump. Can you tell me what command to run on cmd to try dump and get addresses?

try this (datadir is where your wallet is)
python pywallet.py --dumpwallet --datadir=/tmp | \
grep addr | sort | uniq | awk -F'"' '{print $4}' > \
~/tmp/wallet_dump.txt

If you want to see the value for each address, do this
python addrep.py ~/tmp/wallet_dump.txt

/KX