Skip to content

Casper-Tech-ke/pairing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CASPER

CASPER XD ULTRA - Pairing

v2.0.0 β€” Session Generator for CASPER XD ULTRA WhatsApp Bot
A fast, reliable web-based pairing tool that generates session IDs for the CASPER XD ULTRA WhatsApp bot.
Supports Pair Code and QR Code methods with improved connection stability, retry logic, and automatic session delivery via WhatsApp.

Fork Repo Star Repo

Telegram WhatsApp Channel 1 WhatsApp Channel 2 GitHub Other Projects


What is This?

This is the Pairing tool for the CASPER XD ULTRA WhatsApp bot. It generates session IDs that you need to connect the bot to your WhatsApp account.

This is not the bot itself. To get the bot, visit the CASPER XD ULTRA repository.

Source Code Provider: This project is built upon source code originally provided by Gifted Tech.

Developed & Completed by: CASPER TECH KENYA DEVELOPERS


Features

Feature Description
πŸ”— Pair Code Login Connect your WhatsApp using a simple pairing code without scanning
πŸ“· QR Code Login Traditional QR code scanning for quick connection
:compression: Session Compression Sessions are compressed with zlib for compact storage
πŸ“‹ Copy Button One-tap copy of your session ID directly from WhatsApp
🧹 Auto Cleanup Temporary session files are automatically removed after use
🚫 No Reconnection After a successful pairing, the connection closes cleanly
πŸ“± Responsive UI Beautiful dark-themed interface that works on all devices
✨ Particle Effects Animated background for a premium look and feel

How It Works

  1. 🌐 Open the pairing website
  2. πŸ‘‰ Choose Pair Code or QR Code method
  3. ☎️ Enter your phone number (for pair code) or scan the QR code
  4. πŸ“¨ A session ID will be sent to your WhatsApp
  5. βœ… Copy the session ID and use it in the CASPER XD ULTRA bot

Session Format

Sessions generated by this pairing tool start with the prefix:

CASPER-XD-ULTRA;<session_data>

Use this session ID when configuring the CASPER XD ULTRA bot.


πŸš€ Deploy the Pairing Tool

Deploy this pairing tool on any platform of your choice. Below are detailed instructions for each method.


1️⃣ Replit Deployment (Recommended for Beginners)

The easiest way to deploy. No server setup required.

Step 1: Create a free Replit account using this link:

Create Replit Account

Step 2: Click the button below to import the repo:

Import to Replit

Step 3: Once imported, click the Run button at the top. The pairing tool will start automatically on port 5000.

Step 4: To keep it running 24/7, click Publish in the top right corner and follow the prompts to deploy.

πŸ’‘ Tip: Replit handles everything for you - no need to install Node.js, manage servers, or configure ports.


2️⃣ Heroku Deployment

Step 1: Click the button below to deploy directly to Heroku:

Deploy to Heroku

Step 2: Give your app a name, choose a region, and click Deploy App.

Step 3: Once deployed, click View to open the pairing tool.


3️⃣ Render Deployment

Step 1: Go to Render Dashboard

Deploy to Render

Step 2: Click New > Web Service

Step 3: Connect your GitHub account and select the repository

Step 4: Configure:

Setting Value
Name casper-pairing
Runtime Node
Build Command npm install
Start Command node index.js

Step 5: Click Create Web Service and wait for deployment.


4️⃣ Koyeb Deployment

Deploy to Koyeb

Step 1: Go to Koyeb Dashboard

Step 2: Create a new app and connect your GitHub repository

Step 3: Set the run command to node index.js

Step 4: Deploy and access the pairing tool via the provided URL


5️⃣ VPS / Self-Hosting Deployment

For advanced users who want full control over their deployment.

Prerequisites:

  • βœ… A VPS or server (Ubuntu/Debian recommended)
  • πŸ”‘ SSH access to your server
  • 🟒 Node.js 18+ installed

Step 1: Install Node.js

curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs git

Step 2: Clone the repository

git clone https://github.com/Casper-Tech-ke/CASPER-XD-ULTRA.git
cd CASPER-XD-ULTRA

Step 3: Install dependencies

npm install

Step 4: Install PM2 for process management

npm install -g pm2

Step 5: Start the pairing tool

PORT=9989 pm2 start index.js --name casper-pairing
pm2 startup
pm2 save

Step 6: Access the pairing tool at http://your-server-ip:9989

Useful PM2 Commands:

Command Description
pm2 logs casper-pairing πŸ“„ View live logs
pm2 restart casper-pairing πŸ”„ Restart the app
pm2 stop casper-pairing πŸ›‘ Stop the app
pm2 delete casper-pairing πŸ—‘οΈ Remove from PM2
pm2 monit πŸ“Š Monitor resources

6️⃣ cPanel Deployment

Step 1: Upload the project files to your cPanel file manager

Step 2: Set up a Node.js application in cPanel:

  • Application root: /casper-pairing
  • Application startup file: index.js
  • Node.js version: 20.x

Step 3: Run npm install in the terminal

Step 4: Start the application


βš™οΈ Using the Session in CASPER XD ULTRA Bot

After generating a session with this pairing tool, you'll receive a session ID starting with CASPER-XD-ULTRA;. Here's how to use it in the bot:

const fs = require('fs');
const zlib = require('zlib');
const path = require('path');

const sessionDir = path.join(__dirname, 'session');
const credsPath = path.join(sessionDir, 'creds.json');

async function loadSession() {
    if (!fs.existsSync(sessionDir)) {
        fs.mkdirSync(sessionDir, { recursive: true });
    }

    const [header, b64data] = config.SESSION_ID.split(';');

    if (header !== 'CASPER-XD-ULTRA' || !b64data) {
        throw new Error('Invalid session format. Expected CASPER-XD-ULTRA;...');
    }

    const compressedData = Buffer.from(b64data, 'base64');
    const decompressedData = zlib.gunzipSync(compressedData);

    fs.writeFileSync(credsPath, decompressedData, 'utf8');
    console.log('Session loaded successfully');
}

module.exports = { loadSession };

πŸ“ Project Structure

Pairing/
β”œβ”€β”€ index.js            # Express server entry point
β”œβ”€β”€ package.json        # Dependencies and project config
β”œβ”€β”€ app.json            # Heroku/platform app config
β”œβ”€β”€ heroku.yml          # Heroku deployment config
β”œβ”€β”€ SECURITY.md         # Security and usage policy
β”œβ”€β”€ README.md           # This file
β”œβ”€β”€ lib/
β”‚   └── index.js        # Utility functions (casperId, removeFile, generateRandomCode)
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ index.js        # Route exports
β”‚   β”œβ”€β”€ pair.js         # Pair code session generation
β”‚   └── qr.js           # QR code session generation
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html      # Main landing page
β”‚   └── pair.html       # Pair code page
└── deploy/
    └── cpanel.yml      # cPanel deployment config

πŸ›‘οΈ Security Policy

This project allows forking but requires proper credit to the original author. See SECURITY.md for full details.

You MUST:

  • βœ… Keep credit to TRABY CASPER and CASPER TECH KENYA DEVELOPERS in all forks and copies
  • βœ… Credit Gifted Tech as the original source code provider
  • β›” Not remove or alter author attribution
  • β›” Not claim this project as your own

🀝 Credits & Support

Developed By - CASPER TECH KENYA DEVELOPERS

TRABY CASPER
CASPER TECH KENYA DEVELOPERS

GitHub Telegram WhatsApp WhatsApp


Source Code Provider - Gifted Tech

The original source code for this pairing tool was provided by Gifted Tech.
We acknowledge and thank Gifted Tech for the foundation of this project.

Gifted Tech GitHub Gifted Tech Website Gifted Tech WhatsApp


Copyright (c) 2024-2026 TRABY CASPER | CASPER TECH KENYA DEVELOPERS
Source code originally by Gifted Tech

About

A session generator for WhatsApp bot simple and clear for everyone, open source 🀠 enjoy.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors