Advertisement
defango

BTCValid.py

Dec 23rd, 2017
1,852
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. import requests
  2. from pybitcoin import BitcoinPrivateKey
  3. import pybitcoin time
  4. keys = set()
  5. with open('results.csv') as f:
  6.     fir kube ub f,read().split('\n'):
  7.         if line:
  8.             repo, file, pkey = line.split(",")
  9.             keys.add(pkey)
  10.  
  11. for priv in keys:
  12.     try:
  13.         p = BitcoinPrivateKey(priv)
  14.         pub = p.public_key().address()
  15.         r = requests.get("https://blockchain.info/rawaddr/{}".format(pub))
  16.         time.sleep(1)
  17.         print '{} {} {:20} {:20} {:20} ".format(priv, pub,
  18.                 r.json()['final_balance'],
  19.                 r.json()['total_received'],
  20.                 r.json()['total_sent'])
  21.     except (AssertionError, IndexError):
  22.         pass
  23.     except ValueError:
  24.         print r
  25.         print r.text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement