Bitcoin Forum
May 05, 2024, 11:10:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I want to convert a .txt file of 998,000 sha-256 hexadecimal addresses  (Read 485 times)
Elysium Miner (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
March 06, 2018, 10:40:15 AM
 #1

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?
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714950606
Hero Member
*
Offline Offline

Posts: 1714950606

View Profile Personal Message (Offline)

Ignore
1714950606
Reply with quote  #2

1714950606
Report to moderator
1714950606
Hero Member
*
Offline Offline

Posts: 1714950606

View Profile Personal Message (Offline)

Ignore
1714950606
Reply with quote  #2

1714950606
Report to moderator
1714950606
Hero Member
*
Offline Offline

Posts: 1714950606

View Profile Personal Message (Offline)

Ignore
1714950606
Reply with quote  #2

1714950606
Report to moderator
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
March 06, 2018, 11:26:50 PM
 #2

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.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4616



View Profile
March 07, 2018, 01:07:39 AM
 #3

. . . 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?
Elysium Miner (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
March 07, 2018, 02:24:30 AM
Last edit: March 07, 2018, 12:32:08 PM by Elysium Miner
 #4

http://<img src='https://i.imgur.com/zxzQ7g8.png' />

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....
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
March 07, 2018, 02:44:36 AM
 #5




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.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4616



View Profile
March 07, 2018, 02:56:27 AM
Last edit: March 07, 2018, 01:35:13 PM by DannyHamilton
Merited by Foxpup (4)
 #6

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.

LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16599


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
March 07, 2018, 08:27:47 AM
 #7

Bitcoin tool may be what you're looking for.

Elysium Miner (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
March 07, 2018, 12:24:52 PM
 #8

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.
Elysium Miner (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
March 07, 2018, 04:18:47 PM
 #9

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.


DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4616



View Profile
March 07, 2018, 05:04:59 PM
 #10

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.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
March 07, 2018, 09:00:08 PM
 #11

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).

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Andzhig
Jr. Member
*
Offline Offline

Activity: 183
Merit: 3


View Profile
July 04, 2018, 06:03:23 PM
 #12

Bitcoin tool may be what you're looking for.
Share who is available under win10 64  Smiley
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
July 04, 2018, 11:54:10 PM
 #13

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

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Andzhig
Jr. Member
*
Offline Offline

Activity: 183
Merit: 3


View Profile
July 06, 2018, 02:16:40 AM
 #14

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.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
July 06, 2018, 06:07:36 AM
 #15

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..

Andzhig
Jr. Member
*
Offline Offline

Activity: 183
Merit: 3


View Profile
July 06, 2018, 06:28:14 AM
 #16

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
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
July 21, 2018, 11:37:35 PM
 #17

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

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
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!