Check Seed/Mnenonic Phrase to ETH - Python
by catfrom90s - Saturday August 24, 2024 at 02:50 PM
#1
Main.py :

import requests from eth_account import Account import time import json Account.enable_unaudited_hdwallet_features() def load_config():     try:         with open('config.json', 'r') as config_file:             config = json.load(config_file)         return config     except Exception as e:         print(f"Error loading configuration: {e}")         return None def get_wallet_balance(address, etherscan_api_key, proxies=None):     try:         url = f"https://api.etherscan.io/api?module=account&action=balance&address={address}&tag=latest&apikey={etherscan_api_key}"         response = requests.get(url, proxies=proxies)         data = response.json()         balance_in_wei = int(data['result'])         balance_in_eth = balance_in_wei / 1e18  # Convert Wei to Ether         return balance_in_eth     except Exception as e:         print(f"Error fetching balance for address {address}: {e}")         return None def check_balances(file_path, etherscan_api_key, output_file, proxies=None):     with open(file_path, 'r') as file:         seed_phrases = set(file.readlines())  # Using a set to remove duplicates     print("Starting balance check...")     with open(output_file, 'a') as out_file:  # Change to append mode         for seed in seed_phrases:             seed = seed.strip()             if seed:                 try:                     wallet = Account.from_mnemonic(seed)                     print(f"Checking wallet: {wallet.address}")                     balance = get_wallet_balance(wallet.address, etherscan_api_key, proxies=proxies)                     if balance is not None and balance > 0:                         print(f"Success: Address {wallet.address} has a balance of {balance:.18f} ETH.")                         out_file.write(f"Seed: {seed}\nAddress: {wallet.address}\nBalance: {balance:.18f} ETH\n\n")                     elif balance is not None:                         print(f"Address {wallet.address} has zero balance.")                     time.sleep(0.2)  # Delay to avoid hitting the rate limit                 except Exception as e:                     print(f"Error with seed phrase '{seed}': {e}")     print("Balance check completed.") if __name__ == "__main__":     config = load_config()     if config:         etherscan_api_key = config.get("etherscan_api_key", "")         input_file_path = config.get("input_file_path", "")         output_file_path = config.get("output_file_path", "")         proxies = config.get("proxies", None)         if etherscan_api_key and input_file_path and output_file_path:             check_balances(input_file_path, etherscan_api_key, output_file_path, proxies=proxies)         else:             print("Invalid configuration. Please check your config.json file.")     else:         print("Failed to load configuration. Exiting.")

Config.json :

{     "etherscan_api_key": "YOUR_ETHERSCAN_API_KEY",     "input_file_path": "1111.txt",     "output_file_path": "good.txt",     "proxies": {         "http": "http://your_http_proxy",         "https": "https://your_https_proxy"     } }
Reply
#2
I'd like to know how Im supposed to use this code to my advantage.
Ban reason: Leeching | http://raiddfzn73ir6iyxlf7nwytnujiflddog...an-Appeals if you feel this is incorrect. (Permanent)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Script To Steal Any TikTok Username bs0d 302 14,657 10 hours ago
Last Post: saucymel
  Python open redirect checker cuteshiny 36 6,844 02-03-2026, 01:10 PM
Last Post: linyibaby
  [Python} Wordpress checker lord_x 155 23,244 02-03-2026, 01:07 PM
Last Post: diegofuckadona
  Python tip - how to use proxy in exploit code Alegron125 0 218 04-01-2025, 12:55 AM
Last Post: Alegron125
  Python MAİL SENDER Mr_subProcess 2 280 03-18-2025, 10:19 PM
Last Post: Mr_subProcess



 Users browsing this thread: 1 Guest(s)