Skip to content

0xkaz/ethereum-privatekey-seeker

Repository files navigation

Ethereum Private Key Seeker

A tool to search for Ethereum private keys in GitHub codebase and store discovered keys in SQLite database.

⚠️ Important Notice

This tool is for research and educational purposes only.

  • This project is intended for security research and learning about blockchain security
  • Any malicious use is strictly prohibited
  • Do not use this tool to exploit or harm others
  • The authors are not responsible for any misuse or damage caused by this tool
  • Always respect privacy and security of others
  • Use this knowledge to improve security, not to compromise it

Features

  • Search GitHub code content
  • Detect Ethereum private key patterns
  • Validate potential private keys
  • Log search history in database
  • Securely store discovered keys
  • Automatic transaction checking
  • Balance monitoring
  • Asset transfer capability

Setup and Usage

Local Environment

Use make commands for easy operation:

# Display available commands
make help

# Setup environment (install required packages)
make setup

# Create .env file (first time only)
make env

# Run key search
make run

# Show search status
make status

# Check transactions
make check-tx

# Show active addresses
make active

# Check and save balances
make balance

# Show balance history
make show-balance

# Start automatic monitoring (search, transactions, balance)
make monitor

# Test email settings
make test-mail

# Transfer assets to specified address
make transfer

Docker Environment

Easy to run with Docker:

  1. Environment Setup
# Create .env file
cp .env.example .env

# Edit .env file with required settings:
# - GitHub token
# - Chain RPC endpoints
# - Email settings
# - Transfer address
  1. Container Operations
# Build and start container
docker-compose up -d

# View logs
docker-compose logs -f

# Stop container
docker-compose down

Data is persisted in the ./data directory and survives container restarts.

Environment Variables

Configure in .env file:

# GitHub API Token
GITHUB_TOKEN=your_github_token_here

# Chain RPC Endpoints
ETH_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/your-api-key
AVAX_RPC_URL=https://api.avax.network/ext/bc/C/rpc
BASE_RPC_URL=https://mainnet.base.org
BSC_RPC_URL=https://bsc-dataseed.binance.org
POLYGON_RPC_URL=https://polygon-rpc.com
ARBITRUM_RPC_URL=https://arb1.arbitrum.io/rpc

# Email Settings
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-specific-password
EMAIL_TO=recipient@example.com
BALANCE_THRESHOLD=0.1  # Minimum balance threshold for alerts

# Transfer Settings
TRANSFER_TO_ADDRESS=0x...  # Address to transfer assets to
GAS_MULTIPLIER=1.5  # Gas price multiplier for faster transactions

Database Structure

search_logs Table

  • Logs searched repositories and files
  • Records status and search timestamp

found_keys Table

  • Stores discovered private keys
  • Records associated repository info and Ethereum address

transaction_checks Table

  • Stores transaction check history
  • Records transaction count by chain

balance_history Table

  • Stores balance history by address
  • Records balance changes across chains

active_addresses Table

  • Stores addresses with transactions
  • Records active chains and transaction counts

Features in Detail

Key Search

  • Searches GitHub repositories for potential private keys
  • Validates key format and generates addresses
  • Stores valid keys in database

Transaction Monitoring

  • Checks for transactions across multiple chains
  • Tracks active addresses and transaction counts
  • Maintains history of transaction checks

Balance Tracking

  • Monitors balances on all supported chains
  • Records balance history over time
  • Generates reports for high-balance accounts

Asset Transfer

  • Supports multiple token standards:
    • Native tokens (ETH, BNB, etc.)
    • ERC20 tokens
    • ERC721 NFTs
    • ERC1155 tokens
  • Automatic gas price adjustment
  • Batch transfer capability

Email Reporting

  • Configurable balance threshold alerts
  • Detailed balance reports
  • Transaction notifications
  • Secure email delivery

Supported Chains

  • Ethereum Mainnet
  • Avalanche C-Chain
  • Base Chain
  • BNB Smart Chain
  • Polygon
  • Arbitrum One

Notes

  • Be mindful of GitHub API rate limits
  • Handle discovered private keys with extreme caution
  • Docker environment includes automatic restart capability

Legal Disclaimer

This tool is provided for research and educational purposes only. It is designed to help understand blockchain security and improve development practices by identifying potential security risks.

Prohibited Uses:

  • Any malicious or harmful activities
  • Unauthorized access to others' accounts or assets
  • Any illegal activities or exploitation
  • Any use that violates privacy or security

The authors and contributors:

  • Accept no responsibility for any misuse of this tool
  • Do not endorse or encourage any malicious activities
  • Recommend using this knowledge to improve security practices

By using this tool, you agree to:

  • Use it responsibly and ethically
  • Respect privacy and security of others
  • Report any security vulnerabilities found
  • Use it only for learning and research purposes

Remember: With great power comes great responsibility. Use this tool wisely and ethically.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published