Skip to content

Airdrop bot for ton-keeper wallet, works by automating their chrome extension

Notifications You must be signed in to change notification settings

musaspacecadet/tonkeeper-airdrop-bot

Repository files navigation

Wallet Automation Tool

Overview

This tool automates the process of setting up and interacting with a cryptocurrency wallet within a Chrome extension environment. It is designed to handle tasks such as importing a wallet using a mnemonic phrase, setting a secure password, and initiating transactions. The tool utilizes the nodriver library for browser automation and includes robust error handling and logging capabilities.

Features

  • Automated wallet import using a 12 or 24-word mnemonic phrase.
  • Secure password generation and input.
  • Automated navigation and interaction within the wallet extension.
  • Transaction initiation with a specified recipient address.
  • Comprehensive logging of the automation process.
  • Error handling for various scenarios, including invalid mnemonic phrases, insufficient balance, and browser automation issues.

Requirements

  • Python 3.x
  • Chrome browser
  • A cryptocurrency wallet extension (CRX file)
  • A JSON file containing the mnemonic phrase (mnemonic.json)

Installation

  1. Ensure Python 3.x is installed on your system.

  2. Install the required Python packages using pip:

    pip install -r requirements.txt
    

Setup

  1. Mnemonic File:

    • Create a JSON file named mnemonic.json in the same directory as the script.

    • The file should follow this structure:

      {
        "words": [
          { "index": 1, "word": "word1" },
          { "index": 2, "word": "word2" },
          ...
          { "index": 24, "word": "word24" }
        ]
      }
    • Replace "word1", "word2", etc., with your actual mnemonic words. Ensure the words are in the correct order and indexed from 1 to 12 or 24.

  2. Wallet Extension:

    • Place the CRX file of your cryptocurrency wallet extension in the same directory as the script.
    • Rename the CRX file to omaabbefbmiijedngplfjmnooppbclkk.crx or update the extension_crx variable in the main function of wallet_automation.py with the correct filename.
  3. Airdrop Address (Optional):

    • If you intend to initiate a transaction, update the airdrop variable in the main function with the recipient's cryptocurrency address.

Usage

  1. Run the script from the command line:

    python wallet_automation.py
    
  2. The script will perform the following actions:

    • Read the mnemonic phrase from mnemonic.json.
    • Unpack the wallet extension.
    • Generate a unique extension ID.
    • Launch the Chrome browser with the extension loaded.
    • Navigate through the wallet setup process:
      • Import the wallet using the provided mnemonic phrase.
      • Set a strong password.
      • Initiate a transaction to the specified airdrop address (if provided).
    • Log all actions and any errors encountered during the process.

Logging

  • The script logs detailed information about each step of the automation process.
  • Logs are printed to the console.
  • Log messages include timestamps, log levels (INFO, WARNING, ERROR), and descriptions of the actions performed or errors encountered.

Error Handling

  • The script includes error handling for various scenarios:
    • Invalid or missing mnemonic.json file.
    • Incorrect number of mnemonic words.
    • Corrupted or invalid CRX file.
    • Failure to generate a strong password.
    • Issues with browser automation, such as finding and clicking buttons or filling input fields.
    • Insufficient balance for the transaction.
  • Custom exceptions (WalletAutomationError) are raised for specific automation-related errors.
  • Errors are logged with detailed descriptions to aid in troubleshooting.

Customization

  • Extension and Directory:
    • Modify the extension_crx and extension_directory variables in the main function to use a different extension file or directory.
  • Airdrop Address:
    • Change the airdrop variable to send transactions to a different address.
  • Password Length:
    • Adjust the password_length parameter in the fill_password_fields function to generate passwords of different lengths.
  • Timeout:
    • Change the timeout parameter in the click_button_by_text function to adjust the waiting time for button interactions.

Notes

  • This tool is designed for educational and testing purposes. Use it responsibly and at your own risk.
  • Ensure you understand the security implications of automating wallet interactions.
  • Always back up your mnemonic phrase and password securely.
  • The tool assumes a specific structure and behavior of the wallet extension. It may require modifications to work with different extensions or versions.
  • The tool uses a hardcoded extension filename (omaabbefbmiijedngplfjmnooppbclkk.crx). Ensure this matches your actual extension file or update the script accordingly.
  • The airdrop address is also hardcoded (airdrop2025.ton). Update this with the desired recipient address if needed.

Disclaimer

The developers of this tool are not responsible for any loss or damage resulting from the use of this software. Use it with caution and at your own discretion.

About

Airdrop bot for ton-keeper wallet, works by automating their chrome extension

Resources

Stars

Watchers

Forks

Languages