-
-
Save atomantic/7398053c8048281c6686104d1c0aec23 to your computer and use it in GitHub Desktop.
Scrape BitCoin private keys from directory.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# scrape all leaked bitcoin private keys into a tab separated text | |
# <private key>\t<bitcoin_address> | |
# | |
# support autoresume. just add these line into your cron : * * * * bash bitcoinkey.sh | |
# results stored on keys.txt | |
if [ ! -f last.page ]; then prev=`echo 0`; else prev=`cat last.page`; fi; | |
if [ -z $1 ]; then akhir=`echo 10`; else akhir=`echo $1`; fi; | |
abis=$(($prev+$akhir)) | |
awal=$(($prev+1)) | |
for ((i=$awal;i<=$abis;i++)) | |
do | |
echo "+ Scrapping page $i" | |
curl -s "directory.io/$i" > /tmp/tmp.tmp | |
while read baris; | |
do | |
private=`echo $baris | awk -F"<span title" '{print $2}' | awk -F"</span>" '{print $1}' | awk -F"\">" '{print $2}'` | |
address=`echo $baris | awk -F"<span title" '{print $2}' | awk -F"</span>" '{print $2}' | awk -F"blockchain.info/address/" '{print $2}' | awk -F"\">" '{print $1}'` | |
echo $private,$address | awk -F"," '{print $1'\t'$2}'; | |
done < /tmp/tmp.tmp; | |
done; | |
echo $abis > last.page | |
cat keys.txt | sort | uniq > keys.tmp | |
mv keys.tmp keys.txt |
I'm not sure directory.io is even a thing anymore, but it was just dynamically generating keys based on numbers 1-10^77 (all possible keys). This is a pretty inefficient way to mine keys, but the idea on this script was to check the balance on blockchain.info. I don't use this script, just thought it was cute and forked it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you explain how it works I m kinda lost