/ethercheck

Ethereum private key to public address with balance

Primary LanguagePython

Small python script that converts the list of Ethereum private keys into public addresses and checks the current balance of the address.

Requirements:

python 3

Usage:

git clone git@github.com:asimd/ethercheck.git
pip3 install ethereum binascii requests time 
python3 eth.py

This tool uses Google BigQueryDB query results as input. That input comes from scanning regex expression for all public Github repos matching the Ethereum private key.

BigQueryDB query:

#standardSQL
SELECT f.repo_name, f.path, c.pkey
FROM `bigquery-public-data.github_repos.files` f JOIN
     (SELECT id,
             REGEXP_EXTRACT(content, r'(?:^|[^a-zA-Z0=9])([123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ]{64,64})(?:$|[^a-zA-Z0-9])') AS pkey
      FROM `bigquery-public-data.github_repos.contents`
      WHERE REGEXP_CONTAINS(content, r'(?:^|[^a-zA-Z0=9])([123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ]{64,64})(?:$|[^a-zA-Z0-9])')
     ) c
     ON f.id = c.id;

After that, it uses Etherscan's public API to check the balances for the given address.

Note: you may be rate limited if triggering too many ruquests, sign up for API key HERE

Usage Example: ethercheck

Any suggestions, fixes or PR's are more then welcome.

Update: Added normalized CSV for testing purposes.