Author

Topic: I want to convert a .txt file of 998,000 sha-256 hexadecimal addresses (Read 508 times)

HCP
legendary
Activity: 2086
Merit: 4361
I'm not that smart to not read readme. I downloaded everything for compilation in readme and what to write in the compiler panel of a lack of understanding. Then write what to write in the terminal Cygwin.

Quote
including a backdoor (Did you already receive messages from newbies?)..
now (unlike 2005-2014), this is no longer practiced, except that a backward schoolboy
Getting it to run with Cygwin isn't the easiest task... Took me about 30 minutes (including downloading and installing the necessary Cygwin stuff)... even then, there are issues running it as for some reason the Cygwin installer doesn't add the c:\cygwin64\bin directory to the windows %PATH% and the app will complain about missing .dlls Undecided

Once you fix that, then the app will complain about unexpected characters in your input file, unless the input file has UNIX EOL characters (end-of-line) Roll Eyes

Honestly, I believe that your best option is to install the Windows Linux Subsystem and get Ubuntu running... it is a lot easier than attempting to get Cygwin working!

Having said that, I have compiled the source (using Cygwin on Win10x64), and included the necessary Cygwin .dlls in a .zip file here

NOTE: USE AT YOUR OWN RISK! - I accept no responsibility if anything goes wrong.



send me complete file with your 998,000 private keys, let me check which ones have coins so I can steal them.
FTFY... Roll Eyes
jr. member
Activity: 184
Merit: 3
I'm not that smart to not read readme. I downloaded everything for compilation in readme and what to write in the compiler panel of a lack of understanding. Then write what to write in the terminal Cygwin.

Quote
including a backdoor (Did you already receive messages from newbies?)..
now (unlike 2005-2014), this is no longer practiced, except that a backward schoolboy
legendary
Activity: 1624
Merit: 2481
Yes, maybe someone has a compiled for win 10. Because I never compiled anything. Thanks for the help.

No. Noone has 'a compiled' for windows.
If you want to use it on windows, you will have to actually READ the README file and follow the instructions. This will cost you 10 minutes of your time.
Instead of asking for pre-compiled binaries, you might also ask for a compromised version including a backdoor (Did you already receive messages from newbies?)..

Read and follow the readme: https://github.com/matja/bitcoin-tool/blob/master/README.md#window

It is way faster than waiting for someone to compile it for you..
jr. member
Activity: 184
Merit: 3
Are you asking for something that works on Windows 10 64bit? Because there are instructions listed there for compiling on Windows 10: https://github.com/matja/bitcoin-tool/blob/master/README.md#window

Alternatively, you could install the "Windows Linux Subsystem" and run Ubuntu on Windows 10... https://docs.microsoft.com/en-us/windows/wsl/install-win10
Yes, maybe someone has a compiled for win 10. Because I never compiled anything. Thanks for the help.
HCP
legendary
Activity: 2086
Merit: 4361
Are you asking for something that works on Windows 10 64bit? Because there are instructions listed there for compiling on Windows 10: https://github.com/matja/bitcoin-tool/blob/master/README.md#window

Alternatively, you could install the "Windows Linux Subsystem" and run Ubuntu on Windows 10... https://docs.microsoft.com/en-us/windows/wsl/install-win10
jr. member
Activity: 184
Merit: 3
Bitcoin tool may be what you're looking for.
Share who is available under win10 64  Smiley
HCP
legendary
Activity: 2086
Merit: 4361
Seems you would need to include the --public-key-compression argument... As per the readme:
--public-key-compression : Can be one of :
      auto         : determine compression from base58 private key (default)
      compressed   : force compressed public key
      uncompressed : force uncompressed public key
    (must be specified for raw/hex keys, should be auto for base58)

...
Specifying --public-key-compression is mandatory because the WIF output is different depending on which public key compression type you choose, and there is no way to guess from a raw private key.

Also, you need to change the "output-type" as the private-key-wif should not have the leading "--" and the input-type was missing a '-', should be "private-key"

So you'd probably want:
Code:
bitcoin-tool --input-type private-key --input-format hex --output-type private-key-wif --output-format base58check --input-file FILENAME_OF_YOUR_FILE_FULL_OF_HEX_KEYS_HERE --batch --network bitcoin --public-key-compression compressed


Tested using Input File:
Code: (hex.txt)
C0D39382668560A3477537D176D16E11DDBA95C15C9F1A2AF145CC791E059ACC
5BD497C3AB798BBACF58B67387AA147356E0DD2BD37D5EA363C2A95712708038
F5FD159DA47B33F325A7944D154C155198F5747E7009294A28258CD8F1E31301
Command line:
Code:
bitcoin-tool --input-type private-key --input-format hex --output-type private-key-wif --output-format base58check --input-file hex.txt --batch --network bitcoin --public-key-compression compressed
Output:
Code:
L3gYHxbnWWYk1cojMcRf1sZi5FkmsEHJgxLjmuTcJT5sWd79ZAou
KzJDZ7LY5xVHPa2cyaZjqLRPRpqiEBJcxbBy13NjHJYcne6uzfLC
L5Tt2afWZCZuiZYXocQPzbyRHFTwaP4Rza9Gp5zSE6JFjX9DnDja

Then just change to --public-key-compression uncompressed for your uncompressed keys


NOTE: it would appear that the input file MUST be formatted with Unix "End of Line" character (LF) only... it choked on (CR LF):
Quote
Invalid character (ASCII=13) at offset 64
Failed to decode hex input (invalid format).
legendary
Activity: 3472
Merit: 4801
I tried this command and about 10 other variations;  nothing happens.

Hmm.

I just went with what was written in the usage information on the github page.

I don't have time to look at the code and figure out the actual usage right now.  If nobody else explains the proper usage in the next few days, I'll see if I can find the time to look it up.
newbie
Activity: 12
Merit: 0
I can advance $150 USD to whoever wants to make this program and post it on Github as opensource.  You must already have a reputable repository with something of value listed in it.
You can private message me for more info if you are interested.

Did you see the post above from LoyceV?

It looks like such a tool already exists.

It appears that usage in linux would likely be:

Code:
cat FILENAME_OF_YOUR_FILE_FULL_OF_HEX_KEYS_HERE | bitcoin-tool --input-type private key --input-format hex --output-type --private-key-wif --output-format base58check --input-file - --batch --network bitcoin

I tried this command and about 10 other variations;  nothing happens.


newbie
Activity: 12
Merit: 0
I can advance $150 USD to whoever wants to make this program and post it on Github as opensource.  You must already have a reputable repository with something of value listed in it.
You can private message me for more info if you are interested.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Bitcoin tool may be what you're looking for.
legendary
Activity: 3472
Merit: 4801
I know you are trying to helpful but it does say exactly what I mean in the title.

No.  It does not.

Words have meaning.  Use the right words, and you can convey your thoughts.  Use the wrong words, and people won't understand you.

A SHA-256 hash is HEXADECIMAL

A SHA256 hash is an integer.  It can be represented as a decimal, a hexadecimal, a binary, an octal, or any other radix you like.

Hexadecimal is one common method of displaying the integer results of a SHA256 hash.

& Yes it represents a bitcoin address, 2,  in fact....

No.

A SHA256 hash is a 256 bit digest that represents the input data.

A bitcoin private key is also a 256 bit integer.  It also can be represented as a decimal, a hexadecimal, a binary, an octal, or even WIF.

However:
the maximum SHA256 value is:  0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
the maximum valid Bitcoin Private key is: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140

So, not all SHA256 hash values are valid Bitcoin private keys.

Also note.  Your posted image states "Private Key Hexadecimal Format", you are mistaken to call it a "SHA256 hash".

Finally, it is NOT an address at all.  The addresses in your pasted image are:
1Cy7oiyrGzHaz9JVinnMe6UXZApR4nw5et  (Uncompressed)
1KaDXeEAMEnm3nEpDzd88DmaxKApxUFZQx (Compressed)

If you only have either of those addresses, then it is not possible to generate the private key.

So, what you appear to have (based on your image, and what I can make of your misunderstanding of how to use your words) is a set of PRIVATE KEYS in Hexadecimal format, and what you want to do is represent that private key in both compressed WIF and uncompressed WIF?

If that is so, then you can probably pay someone to create such a program for you.  It would be pretty easy to create, but there aren't many that will do it for free.

EDIT: It looks like such an open source tool exists. See LoyceV post below.

hero member
Activity: 854
Merit: 658
rgbkey.github.io/pgp.txt



I know you are trying to helpful but it does say exactly what I mean in the title.
A SHA-256 hash is HEXADECIMAL & Yes it represents a bitcoin address, 2,  in fact....

What you show in that picture is a private key in hexadecimal format, but it has nothing to do with SHA256 or any hash function. (Hash function output is usually represented as hex, but just because something is in hex does not mean it is the output of a hash function). What you want to do is take a private key encoded in hex, and re-encode it in WIF in both compressed and non-compressed mode. I'm not sure why you would want 1,996,000 Bitcoin addresses, half made from compressed keys and half not, but it's unlikely that anybody has made a script to do this. It could be done though.

I should stress that if for whatever reason wherever you got this data from was public, or you could believe that there's even a small chance that someone else would have access to the same list of hex data you have, that using that data as Bitcoin private keys would be a very, very bad idea because somebody else could use that data to generate the same private keys and take any money you would have sent to those addresses.

Even still, there are much better ways to generate large numbers of addresses with Hierarchical Deterministic wallets. I highly suggest you look into those.
newbie
Activity: 12
Merit: 0
">http://

I know you are trying to helpful but it does say exactly what I mean in the title.
A SHA-256 hash is HEXADECIMAL & Yes it can represent a WIF bitcoin address, 2,  in fact....
legendary
Activity: 3472
Merit: 4801
. . . scrape . . . addresses from the file and provide me with . . . WIF private keys.  Can anyone help me?

It is NOT possible to generate a private key from an address.

Perhaps you have hex private keys in the file?

Perhaps you have SHA256 hashes in the file in hex format and you want to convert those hashes into WIF format so that you can use them as private keys?
hero member
Activity: 854
Merit: 658
rgbkey.github.io/pgp.txt
Are these hex addresses raw private keys? Or are they something else? If you just have a hash of something, I don't see how that could correspond to a Bitcoin private key.
newbie
Activity: 12
Merit: 0
I have been looking all over the web for a simple program that will scrape the sha2 hex addresses from the file and provide me with both compressed/uncompressed WIF private keys.  Can anyone help me?
Jump to: