Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: JTV95 on November 13, 2019, 06:33:53 PM



Title: Using Bitcoin Core Having trouble Reading Information
Post by: JTV95 on November 13, 2019, 06:33:53 PM
I backed my wallet up from Bitcoin Core. When I open the file all I see is a bunch of square boxes.

When I try to open blocks it's all screwed up too. This is what it looks like if I open it with Atom. How can I resolve this? Is there a certain program I need to use to open these files?

����;���z{�z�,>gv�a�È�Q2:���K^J)�_I���+|����M��EThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks�����*CAg����UH'g��q0�\֨(�9   �yb��a޶I��?L�8��U���\8M�� �W�Lp+k�_������o��
���r���F�c�O��e�Z�h�� Q�K�D��h�g{���T ��Ͷ�W#>a�fI���b������������*CA��8�SQ�rj,������:b|f����{�<R�u�7�������"�rf�bs�,�#B�X�������H`�� �~����BuAo�QY��h������T%�zZ���HX��f\�6�tN�,1`"����fI��ҽa������ �����*CAr�$�[PR(���LϪ�V��7���z@@��s��Ȑd�O8R7�!g�>#dF��y���A*�1kw�������ݙ�������]p�
�{���kc_bjD�r"`��]�����_�   ���{�����v|���]�fI����m�����������*CA����l[)����פ���|�`����f���#͉q��� '&�t����u�>5P��0o<ժ������IDF�b�,t٥5� o>@�������U��z���@�.2�&+(c��S7�Ej�^�����+ߌ�fI��+��������������*CAO2��\nR.fhc$������aO�i��O7��
�1�k��C7>7�1���n���g�������J�H���"���Y�   ���ɖ��UۺN�H����%ʄ�#7 �8���\������E(RcD�fI���w������ �����*CAVW�6�P�Δ�b�}��C�
s


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: Deathwing on November 13, 2019, 06:51:50 PM
Are you sure that you are checking your wallet.dat file? Just so you know, that part you copied has the information of the genesis block. Your wallet should be encrypted anyway, you can open the backed up file with any wallet executable. Electrum is mostly the preferred one other than Bitcoin Core. You shouldn't really dig into encrypted files with Atom or any text editor.


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: JTV95 on November 13, 2019, 07:02:39 PM
Are you sure that you are checking your wallet.dat file? Just so you know, that part you copied has the information of the genesis block. Your wallet should be encrypted anyway, you can open the backed up file with any wallet executable. Electrum is mostly the preferred one other than Bitcoin Core. You shouldn't really dig into encrypted files with Atom or any text editor.

Yes I'm checking the the wallet.dat file. Should the file be readable or use a bunch of blank white boxes? I didn't want to post my wallet. I was using the Genesis block as an example. Both the backed up wallet and the genesis block read similar. (Instead of question marks it's boxes) Good to know about not using atom or test editors for encrypted files. Thanks


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: DannyHamilton on November 13, 2019, 07:54:50 PM
I backed my wallet up from Bitcoin Core. When I open the file all I see is a bunch of square boxes.

You opened it with Bitcoin Core?

When I try to open blocks it's all screwed up too.

Open blocks?  What are you trying to do.  Data is typically stored rather efficiently rather than storing everything in human readable text.

This is what it looks like if I open it with Atom.

You're not going to have a lot of luck trying to read binary data with a text editor.  Perhaps try using hexdump first (depending on what you're trying to do?

How can I resolve this?

What are you trying to resolve?

Is there a certain program I need to use to open these files?

Yes.  Bitcoin Core.

Should the file be readable or use a bunch of blank white boxes?

It's binary data (a bunch of 1's and 0's.  What that looks like will depend on what you use to view it.  If you try to view it with a text editor then the text editor will try to convert bytes of 1's and 0's to alphanumeric characters.  It will typically look like a useless mess.

I didn't want to post my wallet.

You definitely should NOT post your wallet!!!

Both the backed up wallet and the genesis block read similar. (Instead of question marks it's boxes)

They are both binary data.

Good to know about not using atom or test editors for encrypted files. Thanks

Or any binary data at all.


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: Heisenberg_Hunter on November 13, 2019, 08:00:01 PM
Should the file be readable or use a bunch of blank white boxes? I didn't want to post my wallet.

What are you trying to do here?  ??? Pretty much confusing since you have backed up your wallet. The wallet.dat isn't a human readable file and it is neither a file for you to open with a text editor such as Atom. The file is a database file and should be opened up with a wallet software such as Bitcoin Core or Electrum. The file is not only a encrypted one but consists of binary data as well. Better try with db_dump to view the data present in the file but I am not very sure regarding the same.

Oops Danny was faster


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: maplelake on November 13, 2019, 10:38:47 PM
Why do you want to open wallet.dat file? I am not sure about the use case.
If just for fun to see what is inside wallet.dat, any text editor is fine.
There is no linked exe for it, i mean double click and some application is launched and open this file directly.
GUI part: you could load it in Bitcoin core client.
Console part: you could view it by bitcoin-cli by typing cmd.


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: BitMaxz on November 13, 2019, 11:58:04 PM
Never heard someone could decrypt those text from the wallet file why not directly use that wallet file into your Bitcoin core?

If it's asking for a password and you don't know what's your password the only way you can get the password of that wallet file is by using the BTCrecovery.

If you are looking for a guide you can check this tutorial below.

- https://github.com/gurnec/btcrecover/blob/master/TUTORIAL.md#btcrecover-tutorial

If you remember some parts of your password just include it there if you forgot only a few characters you can recover your wallet in days but if not it takes a week or more.

Goodluck.


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: nc50lc on November 14, 2019, 03:39:31 AM
Quote from: JTV95
When I open blocks. Why are the boxes like this? � What does this stand for?
It's a wildcard character when the program that's reading the file have no idea what the data stands for.

I want to be able to see the characters that represent the coding in the blocks and my .dat files. some characters are symbols my computer recognizes. The rest are ����������� these type of symbols.
Those "recognized" characters happened to be decoded because those parts somehow matched a valid character's string, but that doesn't mean that the data represents that character;
Those are pure coincidence except for the part: "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" which was purposely added in the genesis block.

Quote from: JTV95
What exactly does the Genesis block look like without all these ����� things?
Use Bitcoin Core (open Bitcoin-qt, then open window->console)

Type: getblockhash 0 to get the block hash of the genesis block.
This will be the result: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

Then type: getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 0
To "view" the genesis block in HEX.
Or type: getblock 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f 2
To view the human readable format.

Not synced? Use these online tool instead: https://chainquery.com/bitcoin-cli/getblockhash (https://chainquery.com/bitcoin-cli/getblockhash) | https://chainquery.com/bitcoin-cli/getblock (https://chainquery.com/bitcoin-cli/getblock)
for height 1+.


No spoiler, DIY :)


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: DannyHamilton on November 14, 2019, 02:56:29 PM
You might want to take a look at the information at this link:

285 bytes that changed the world (http://web.archive.org/web/20140213190023/http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world/)

When I was new to all of this, I found it quite enlightening.


Title: Re: Using Bitcoin Core Having trouble Reading Information
Post by: JTV95 on November 15, 2019, 12:52:32 AM
Thank you guys for the responses. They were very helpful!