Bitcoin Forum
April 25, 2024, 07:17:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: b(i)tc(oin)-lookup - a quick and dirty bash-script  (Read 844 times)
ckz666 (OP)
Newbie
*
Offline Offline

Activity: 23
Merit: 0



View Profile
November 18, 2014, 05:52:28 PM
Last edit: November 22, 2014, 07:37:03 PM by ckz666
 #1

hello all,

i was bored and wrote this little script on my old Macbook to waste my time and to see if it can find any hit (i know that this is almost impossible)  Grin

Code:
#!/bin/bash
#
#
# b(i)tc(oin)-lookup
#
# generate a bitcoin address including privatekey with vanitygen and check for received coins in
# (local)blockchain.
# you can use any blockexplorer/blockchain api, but i prefer local blockchain (like insight) for speed.
# don't spent found coins!


banner()
{
clear
echo "       #############################"
echo "      ##     b(i)tc(oin)-lookup  ##"
echo "     ##          by ckz666      ##"
echo "    #############################"
echo
echo "     coin me if u like it ;)"
echo "1CKZ666MXRwjhFjQpMTgDxKjYCU2fadMDi"
echo
}

if [[ ! -f vanitygen ]]
then
banner
echo "- vanitygen not found!"
echo
exit
fi

banner

count0=0
count1=0
btccount=0

while :
do

vani=$(./vanitygen 2> /dev/null -q 1)
addr=$(echo $vani | sed -e s/[[:space:]]Privkey:.*// -e s?.*Address:[[:space:]]??)
priv=$(echo $vani | sed -e s?.*Privkey:[[:space:]]??)
btc=$(curl -s http://localhost:3000/api/addr/$addr/totalReceived)
count0=$(($count0+1))

if [[ $btc > 0 ]]
then
count1=$(($count1+1))
btccount=$(($btccount + $btc))
echo "$addr:$priv-$btc" >> btcoins
fi
echo -ne " Found $count1 hits with $btccount satoshi's => Try $count0 - $addr $btc \033[0K\r"
done

you need vanitygen (catch it here https://github.com/samr7/vanitygen) in the same dir as this script.

Have fun with this Wink

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!