Bitcoin Forum
November 13, 2018, 04:00:29 AM *
News: Latest Bitcoin Core release: 0.17.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 209 times)
Elysium Miner
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?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542081629
Hero Member
*
Offline Offline

Posts: 1542081629

View Profile Personal Message (Offline)

Ignore
1542081629
Reply with quote  #2

1542081629
Report to moderator
1542081629
Hero Member
*
Offline Offline

Posts: 1542081629

View Profile Personal Message (Offline)

Ignore
1542081629
Reply with quote  #2

1542081629
Report to moderator
1542081629
Hero Member
*
Offline Offline

Posts: 1542081629

View Profile Personal Message (Offline)

Ignore
1542081629
Reply with quote  #2

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

Activity: 840
Merit: 628


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: 2198
Merit: 1385



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
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
March 07, 2018, 02:24:30 AM
 #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: 840
Merit: 628


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: 2198
Merit: 1385



View Profile
March 07, 2018, 02:56:27 AM
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: 1302
Merit: 2249


Self-made Legendary!


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

Bitcoin tool may be what you're looking for.

Elysium Miner
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
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: 2198
Merit: 1385



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

Activity: 784
Merit: 951

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

Andzhig
Newbie
*
Offline Offline

Activity: 71
Merit: 0


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

Activity: 784
Merit: 951

<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

Andzhig
Newbie
*
Offline Offline

Activity: 71
Merit: 0


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

Activity: 742
Merit: 689



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
Newbie
*
Offline Offline

Activity: 71
Merit: 0


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

Activity: 784
Merit: 951

<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

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!