Skip to content

hungz2/klokapp_auto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KlokappAI Testnet Bot

A Node.js bot for automated participation in the KlokappAI testnet.

Overview

This bot helps automate interactions with the KlokappAI platform by:

  • Connecting to the KlokappAI API using an Ethereum wallet
  • Automatically sending chat messages
  • Managing rate limits
  • Rotating between different crypto/blockchain related questions
  • NEW: Support for multiple private keys and proxy rotation

Prerequisites

  • Node.js 16.0.0 or higher
  • Ethereum private key(s)
  • (Optional) Proxy server(s) for enhanced privacy

Installation

  1. Clone the repository:

    git clone https://github.com/mesamirh/KlokappAi-Testnet-Bot.git
    cd KlokappAi-Testnet-Bot
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file in the project root with your Ethereum private key(s):

    # Cách 1: Một private key
    PRIVATE_KEY=your_private_key_here
    
    # Cách 2: Nhiều private keys (mỗi dòng là 1 key)
    PRIVATE_KEY_1=key1_here
    PRIVATE_KEY_2=key2_here
    PRIVATE_KEY_3=key3_here
    
    # Cách 3: Legacy format (phân cách bằng dấu phẩy)
    PRIVATE_KEYS=key1_here,key2_here,key3_here
    
  4. (Optional) Create a proxy.txt file with your proxy list:

    http://username:password@proxy-server:port
    socks5://username:password@proxy-server:port
    http://another-proxy:port
    

Usage

Start the bot:

npm start

The bot will:

  1. Load all private keys from .env file
  2. Load all proxies from proxy.txt file
  3. Create multiple bot instances (one per private key)
  4. Assign proxies to each bot (rotating if fewer proxies than keys)
  5. Connect each wallet to KlokappAI (via assigned proxy)
  6. Check available message limits for each account
  7. Send chat messages until reaching the limit for each account
  8. Wait for the rate limit to reset before continuing

Features

  • 🔐 Secure wallet connection
  • 🤖 Automated message sending
  • ⏱️ Rate limit management
  • 🔄 Automatic reconnection on errors
  • 💬 Varied question set for natural interactions
  • 🔗 NEW: Multiple private keys support
  • 🌐 NEW: Proxy rotation for enhanced privacy

File Structure

KlokappAi-Testnet-Bot/
├── main.js              # Main bot script
├── .env                 # Private key configuration
├── proxy.txt            # Proxy list configuration
├── run-multiple-bots.js # Legacy script for multiple bots
├── package.json         # Dependencies
├── env.example          # Environment configuration example
└── README.md           # This file

Configuration

Private Keys Setup

Single Key:

PRIVATE_KEY=your_ethereum_private_key_here

Multiple Keys (Recommended):

PRIVATE_KEY_1=key1_here
PRIVATE_KEY_2=key2_here
PRIVATE_KEY_3=key3_here

Legacy Format (Comma-separated):

PRIVATE_KEYS=key1_here,key2_here,key3_here

Proxy Setup

Create proxy.txt with one proxy per line:

# HTTP Proxy với authentication
http://username:password@proxy-server:port

# SOCKS5 Proxy với authentication
socks5://username:password@proxy-server:port

# HTTP Proxy không có authentication
http://proxy-server:port

# Ví dụ cụ thể:
http://user123:pass456@192.168.1.100:8080
socks5://user123:pass456@proxy.example.com:1080
http://free-proxy.com:3128

Proxy Assignment Logic

  • Nếu có ít proxy hơn key: Proxy sẽ được luân phiên sử dụng
  • Nếu có nhiều proxy hơn key: Chỉ sử dụng số proxy bằng số key
  • Nếu không có proxy: Tất cả bot sẽ chạy trực tiếp

Proxy Configuration

The bot supports various proxy formats:

HTTP/HTTPS Proxy:

http://username:password@proxy-server:port
https://username:password@proxy-server:port

SOCKS5 Proxy:

socks5://username:password@proxy-server:port

Without Authentication:

http://proxy-server:port
socks5://proxy-server:port

Examples

Example 1: Single Key with Proxy

# .env
PRIVATE_KEY=0x1234567890abcdef1234567890abcdef12345678
# proxy.txt
http://user:pass@proxy1.com:8080

Example 2: Multiple Keys with Multiple Proxies

# .env
PRIVATE_KEY_1=0x1234567890abcdef1234567890abcdef12345678
PRIVATE_KEY_2=0xabcdef1234567890abcdef1234567890abcdef12
PRIVATE_KEY_3=0x9876543210fedcba9876543210fedcba98765432
# proxy.txt
http://user1:pass1@proxy1.com:8080
socks5://user2:pass2@proxy2.com:1080
http://user3:pass3@proxy3.com:3128

Example 3: Multiple Keys with Single Proxy

# .env
PRIVATE_KEY_1=0x1234567890abcdef1234567890abcdef12345678
PRIVATE_KEY_2=0xabcdef1234567890abcdef1234567890abcdef12
# proxy.txt
http://user:pass@proxy.com:8080

Configuration

You can modify the questions array in main.js to customize the messages sent by the bot.

Graceful Shutdown

Press Ctrl+C to gracefully shut down all bots.

Disclaimer

This bot is for educational purposes only. Use at your own risk and in compliance with KlokappAI's terms of service.# klokapp_auto

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors